Copyright protection of software
Software is protected by copyright law. As a consequence software is protected without the need for registration or other formalities. The software will be protected as soon as it has taken shape.
The protection of software by patent law
Software as such is excluded from protection by patent law.
This does however not mean that a machine, device or appliance that contains one or more pieces of software cannot be patented. For example, a food processor that can iron laundry could be patented, even though the processor is operated by software.
Products and processes that meet the conditions of patentability, can be patented, even if they contain a piece of software.