The two words are close in spelling but their meanings are quite different. A complement is something added to perfect a thing and make it complete, whereas a compliment is an expression of praise:
- A fine wine is the perfect complement to good cooking.
- The cook received many compliments from the guests that evening.
Both words are also used as verbs, and both have adjectival forms: complementary and complimentary. Complimentary has the special meaning "given free"; and so a complimentary copy of a book is one given without charge, whereas a complementary copy is one that completes a set of books.