“Compliment” is more commonly used. It means saying something nice about someone.
Examples: Mari Bontrager complimented Bob McElwain on his latest book…Jackie McCutcheon complimented Terence Kierans on his technical support tips…My compliments to the chef.
“Complement,” much less common than “compliment,” has a number of meanings associated with matching, completing, or perfecting. If you’re not giving someone praise, the word is usually “complement.”
Examples: My new yellow socks complement my orange shoes…His purple hair complements his green eyes…The Air Force base has a full complement of pilots.