Compliment with an i means to praise or admire, or the praise or admiration itself.
You might say, for example, 'I complimented Chloe on her successful marketing campaign.'
That is, you were praising Chloe for doing a good job.
To remember this, think of what you say when you're praising or admiring something:
'I LIKE IT'
Look at that - not one, but three capital 'I's!
Complement with an e means to complete.
For example, 'Her red shoes complemented her dress beautifully.'
Her shoes weren't telling her dress how fantastic it looked, they were completing her outfit.
To remember this, think of that cheesy line in Jerry Maguire:
'YOU COMPLETE ME'
Well, what do you know? Three capital 'E's. It's almost as if Tom Cruise knew that one day I'd need his help explaining this.
So in summary, if you like it, use the i.
And if something completes something else, use the e.
I hope you found that useful. If you did, let me know in the comments (you can even give me a compliment!). If you have any other word dilemmas, punctuation problems or spelling blind spots, let me know and I'll try to explain it clearly for you.