Explanation
The cat is UNDER the table
In this sentence, the word "under" showcases the location of the cat (subject) with regard to the table (object),
hence under is a preposition.
The words "cat" and "table" are nouns and "under" is used after the subject noun