Only a machine, manufacture, process or composition of matter is patentable. Any invention that does not fall in these four categories are not patentable.
Even if an invention can be classified as a machine, manufacture, process or composition of matter, the invention is not patentable if it is an abstract idea, a law of nature or a natural phenomenon.
Invention also cannot be obvious. If a simple substitution, combination, or application of common steps or component over an already published invention is enough to reproduce the invention, then it is considered obvious. Obvious invention is not patentable.