A copyright is a transferable right to control copying of some content (replicatable work) produced originally by individual capital (creativity) and intended to reward that creator for their willingness to share it.
Today it is also used to monopolize other instructional capital, creating some overlap with patents. An issue with this overlap is that patents do require very detailed descriptions and are quite expensive to get, and are only good for a limited time (usually one generation or 17-20 years). While copyrights can last much longer, 75 or more years.
Copyright is protected under different laws that have lately become very similar due to globalization.
Free software originated when Richard Stallman noticed that patent law was being applied and restricting some types of software innovation. This he thought was restricting creativity as applied to software.