Magic Jar provides opportunities for you to enter or leave a creature's body.
You can attempt to possess any humanoid within 100 feet of you [meaning, 100 feet of the container] that
you can see (creatures warded by a protection from evil and good or
magic circle spell can’t be possessed). The target must make a
Charisma saving throw. On a failure, your soul moves into the target’s
body, and the target’s soul becomes trapped in the container. On a
success, the target resists your efforts to possess it, and you can’t
attempt to possess it again for 24 hours...
While possessing a body, you can use your action to return from the
host body to the container if it is within 100 feet of you, returning
the host creature’s soul to its body.
If you wanted to do this quickly and often, you might be frustrated by the fact that the creature would be unavailable for 24 hours if it ever succeeded on the saving throw. And if the creature ever became unwilling, it would probably run away from the container once it had control of its body back. But otherwise, go ahead.
But watch yourself... literally
Note that Magic Jar lasts "until dispelled." And if the spell ends when you are more than 100 feet from your original body (or your original body is dead) you die. As such, if you are "sharing" another creatures body far away from your original one, and someone casts "dispel magic" upon the magical effect which is permitting your soul to occupy that body, then the Magic Jar spell could end. In that case, you would instantly die. In order to do this safely, you'd need to keep your body close by, and would also need to periodically feed it and keep it in relatively good health.
So take care with this strategy. As much fun as it could be to do an "All Of Me" style zany romp sharing one body back and forth, keep in mind you're messing with powerful necromantic forces here. If you're not careful, it could backfire with severe consequences.