I'd say that a moshpit is a pile (or pit) of people doing some wacked out, aggressive-filled dancing. The dancing within the moshpits moshing
includes pushing, punching, kicking, jumping, and anything else that can be done physically.
It's pretty pointless to be coming out with a broken bone or something, but it's a good way to let out anger or aggression on someone you don't know!
Just watch a few videos that are at a hardcore, metal, or heavy-sounding rock band's concert, most of them (rather all of them) might include moshpits.