While we are focused on patents, it's important to understand the wider context and different types of, intellectual property, and they protect different 'things' in different ways.
Utility patents may be granted to anyone who invents or discovers any new and useful process, machine, article of manufacture, or composition of matter, or any new and useful improvement thereof;
Design patents may be granted to anyone who invents a new, original, and ornamental design for an article of manufacture; and
Plant patents may be granted to anyone who invents or discovers and asexually reproduces any distinct and new variety of plant.
The invention needs to be "useful" - has a useful purpose
Needs to be novel or original - no prior art that someone has already done
Needs to be non-obvious - to a person with ordinary skills in the area of the technology related to the invention
A work needs to be original - meaning it has markers of creative decision making by the creator
A work needs to be fixed in a tangible medium - meaning written, drawn, typed, recorded or otherwise set or captured