Patents are a form of copyright that covers technological inventions and processes, including software.
"Patents protect the features and processes that make things work. This lets inventors profit from their inventions." UK Intellectual property office
The following is from the" UK Intellectual property office website ...
Because software takes many forms, not all programming can be patented. Their are complex rules about this.
A digital music file (eg mp3) may be subject to a number of copyrights (composer, recording owner, arrangement, performer etc) but not patents. However, some of the technologies employed to make the recording may be patented.
An image editing programme (such as Photoshop) cannot be patented in its entirety because it contains many non-original ideas and concepts. However, specific unique features and programming routines/elements within the programme may be patented.