You say this when someone is doing a good job and you want to encourage them to continue. It's used by a person of higher authority talking to a person under them. For example, a teacher to a student, a coach to a player, a manager to an employee, or a parent to a child. If you use it to a person who's not under your authority, it can sound rude.
You usually say this phrase at the end of the conversation, after you have talked about the good things that the person did. For example:
- Boss: Katie, I really like the way that you designed this. The colors really work well together. I think this is going to look great.
- Katie: Oh, thank you.
- Boss. You've really been doing some great stuff lately. Keep up the good work.
A good response to this is, "Thanks, I will."