You either lose some pieces or directly lose the game.
How do you know when you’ve blundered?

Trust me, you'll know. If I had a dollar for every time I have played a move and immediately cringed, I could probably make enough to live off of just by playing consistently.

Blunders usually become apparent fairly quickly. Many of them are either miscalculations or a failure to diagnose a threat. Of course, every once in a while the opponent misses the blunder, in which case you'll typically either breathe a sigh of relief or laugh about it later when you find it during analysis.
How do you know you blundered?