It depend what piece of the flop you hit and what ranges you put the aggressor on.
Bottom or middle pair are not the nuts, villain may have hit a set, 2pair, or even worse hit top pair with you but has the better kicker. First figure out what
hands are beating you, possible flush and straight draws and rank your hand accordingly. If you are using a HUD pay attention to villains aggression factor, VPIP etc or if not how you think they play. Will they bet into the pot with air, if you bet will they fold,etc. All these factors play a role in determining what is the right course of action.
If I had no reads / data on the player and lets say middle pair on the flop, I would check to villain. Depending on the bet size by villain, I would call or re-raise.The idea being that I need another card to beat him (or force him of the hand); he did raise pre-flop indicating a decent hand however he is in late position, so any Ace, any pocket pair, 1 gap suited connectors etc. and the chances of flopping a set are about 10.5%. If villain pushes then its an easy fold.
With the maniacs at the tables nowadays, it is certainly harder in these situations. However you need the right cards to defend your blinds; basically the same range (maybe a little looser) as someone in late position and it is a lot more dangerous.
The best advice is Doyle Brunson's .
"Try to decide how good your hand is at a given moment. Nothing else matters. Nothing."
--Doyle Brunson