Originally these two spellings were used interchangeably, but they have come to be distinguished from each other in modern times. Most of the time the word people intend is “compliment”: nice things said about someone (“She paid me the compliment of admiring the way I shined my shoes”). “Complement,” much less common, has a number of meanings associated with matching or completing. Complements supplement each other, each adding something the others lack, so we can say that “Alice’s love for entertaining and Mike’s love for washing dishes complement each other.” Remember, if you’re not making nice to someone, the word is “complement.”
A complement can also be the full number of something needed to make it complete: “my computer has a full complement of video-editing programs.” If it is preceded by “full” the word you want is almost certainly “complement.”
See also complementary.
BUY THE BOOK!