Let's say you wrote a song. The music is yours, the words are yours too. If the words are not yours, then you will have (if 70 years have not passed since the author's death) to conclude an agreement with the poet on the conditions under which you can use his poems. In general, an agreement is the main way to protect copyright.
Just remember that copyright is double. On the one hand, these are personal non-property rights, for example, your name (or pseudonym) as the author. On the other hand, these are the exclusive rights of the author to use his works. For your information: copyright infringement - and attribution of authorship, and violation of rights of use - if they caused serious damage to the author - a criminal offense (Article 146 of the Criminal Code of the Russian Federation).
So you've written the song. Copyright arises upon the creation of a work and does not require any special registration steps. Another thing is that you can provide each copy of the song with an inscription: ©, your last name, year of writing. You can also fix the priority: the date of creation of your song (it is very unlikely, but it may happen that someone writes the same song, and the question arises in court who did it first). You can register the priority in special legal offices under the Russian Authors' Society, or on your own - by sending the song to yourself by registered mail.
The next question will be what exactly do you want to protect the song from. Most often there are three threats: your song will be passed off as yours, released on CD and made money on sales; your song is used, say, in a play, the author will not be indicated, you will not be paid; your song will be rearranged as karaoke or will be used in a different arrangement with different words and again you will not be paid. That is, you are not defending the song, you are defending your right to receive money for the legitimate use of your song. And such protection is carried out by a license agreement.
There is a pitfall here. If you post your song on the Internet on public portals, this means that you will never know for sure who downloaded your song, processed, uses and receives your money for it. Of course, there are detective agencies that will help you find villains, and then a statement of claim to the court or the prosecutor's office, article 146 … The pitfall is in the anonymity of the Internet. And you conclude a license agreement with a specific person or legal entity. And in this agreement you clearly indicate the rights to which types of use of the song you are transferring (you will find a list of exclusive rights in Article 1270 of the Civil Code of the Russian Federation). For how long do you transfer the rights. What sums of money and in what order you are paid for the transferred rights. What is the responsibility of the parties for non-compliance with the terms of the contract. For example, suppose you want a studio to release your song (or an album of 10 songs - that doesn't change the picture) as a CD and sell it. And this means that under a licensing agreement, you must transfer to the studio the rights at least to reproduce (release a CD), distribute (sell), publicly show a fragment of a song for advertising purposes, and also, if you need to make the arrangement more technically and aesthetically high quality, and reworking the song.