For me, it completely depends upon the vibe being given off by the band, and how the crowd is receiving it. That being said, I generally wind up moshing for at least a part of most of the metal or punk shows I go to.
It's important to keep in mind that a couple of drunk assholes pushing everybody around them does not a mosh pit make. Protip: if nobody is pushing back, you're not in a pit, you're just being a dick.
I really can't understand people who dismiss moshing as beneath them, or a practice only for hicks and neckbeards. If you don't express your enjoyment of music that way that's fine, but nobodies forcing you to be in a pit. I can understand having bad experiences with the practice, but it's the generally fault of those specific individuals involved, and not the practice itself (unless you find getting sweaty and dizzy a bad experience). I suppose I'm just asking you keep an open mind, and try not to judge harshly. Less name-calling would also be appreciated.