I'm sure that you've looked in the dictionary and found that the basic meaning of "flatter" is something like "praise or compliment insincerely, especially to further one’s own interests". The degree of negativity, or censure, depends greatly on the context. Sometimes the word might be used very light-heartedly, other times more seriously.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.