Your work—if sufficiently original—is under copyright protection the moment it is created and fixed in a tangible form – this includes saving it as a digital file. Thus, if you write down an original song, it is protected by copyright. If you simply think the song up and sing it to yourself or to another person, it is not protected by copyright because it is not fixed.
Although registration is not required for copyright protection to exist in a work, formal registration enhances the value of the copyright and the rights afforded to the copyright owner. Most importantly, registration is required for a creator to take legal action to enforce their copyright through litigation. Registering a work prior to infringement (or within three months of publication) also allows the copyright owner to sue for statutory damages, attorneys’ fees, and costs, which can be very important in case where actual damages are difficult to prove. Registration also establishes a record with the U.S. Customs and Border Protection (CBP) and protects the copyright owner against importation of infringing copies. However, registration must be done before or within five years of the first publication of the work. Lastly, registration creates a public record of ownership that provides notice to would-be infringers and may prove helpful in potential ownership disputes.