Say you work in the studio with an artist making a beat from scratch. Your done with the beat. then the artist records with it. The track later appears on an album or mixtape. Do you have to get it copyrighted? How do you paid for your work and royalties??/
All depends on the agreement you have between you and the artist. The default rule - if you don't have any agreement that says otherwise - is that two people who work on one song are both co-owners. That means that either of you are free to license the song non-exclusively without the other's permission (though you have a duty to account for any royalties received as a result). If that's not the situation you want, you need an agreement. It's also a good idea to have an agreement beforehand, as far too many times joint authors have gotten into huge battles/lawsuits about how much each contributed to the work once the money starts rolling in.
Who is responsible for registering the copyright is something you should also work out, but it's not what you should be worrying about.