If you 'flatter' someone, or say something 'flattering', it's like giving someone a compliment - saying something nice about that person's abilities or appearance. It isn't always sincere, but it can make that person feel good.
'Very flattering!' is almost used always used ironically. If someone says or does something which suggests that, for example, they think you are ugly or stupid, you'd say 'Very flattering!' It's usually used in a jokey way, though - you're not really insulted.