They're actually pretty similar words, but mimic more often implies satirical mockery.
You might mimic someone's dance moves to make fun of them. Or you might mimic the way someone walks (their gait) to make a joke.
Imitate could also be used in the sentences above but a common saying is that imitation is the sincerest form of flattery.