The first thing to do is see if your program allows it. Many will not. As a resident, you're paid by your program. if you rotate somewhere else, they still have to pay you and they lose any CMS funding they would get. But some places will allow it to try to help your fellowship match, or to provide an experience that they don't have. And some programs are over their medicare cap, so no funding is lost when you rotate elsewhere.
If you go to a different state, then you will need a license for that state, so easier if you stay in your home state.
Simplest thing to do is ask where other residents have gone.