Compliment and complement sound alike, but their meanings are different.
Compliment may be a noun meaning admiration or praise, or it may be a verb meaning to give admiration or praise.
Example 1: He paid her a compliment on her sense of humor.
Example 2: Did you compliment Elizabeth on her science project?
Complement may be a noun meaning something that completes something else or makes perfect. As a noun it may also refer to a grammar term, as in subject complement. It may also be a verb meaning to make whole.
Example 1: The ribbons were the perfect complement to her dress.
Example 2: A light dessert will complement the meal.