In general, copyright covers original works of authorship. Thus, when you write code, it can be considered as an original work (e.g. source code, executable, intermediate representation, etc.) that is protected by copyright. The holder of the copyright may decide if, and under what conditions, a program may be temporarily or permanently copied, translated, adapted or otherwise altered, or distributed. A computer program is thus released with a license, which defines authorized uses and their limitations. Also open-source programs come with a license. When your computer program furthermore contains other original artistic works (music, animations, etc.), these are also protected by copyright.