As a noun, complement means "anything that completes or perfects." As a verb, complement means "to make complete" or "to enhance."
A complement of four students would bring our class up to its normal size, [noun] That teal blouse complements your jacket nicely, [verb]
As a noun, compliment means "something said in admiration, praise, or flattery." As a verb, compliment means "to congratulate" or "to praise."
Jeff's mother complimented him on the job he had done cleaning his room, [verb] The compliment from his mother boosted Jeff's morale, [noun]