A preposition is almost always followed by a noun or a pronoun (the "object" of the preposition). It is never followed by a verb.
Correct: "I am good at tennis." (Noun)
Correct: "I am good at playing tennis." ("Playing" here acts as a gerund/noun).
A Note on "Ending Sentences": You might have heard that you should never end a sentence with a preposition (e.g., "Who are you talking to?"). In modern, natural English, this rule is largely considered outdated and stuffy. It's perfectly fine to end with a preposition in most casual and professional writing!