>>1577195A pneumatic tire is just an armored balloon, if you compress it sufficiently at a point you'll force all the air out of the way and into the remainder of the tube. When that happens because you have an impact with a blunt edge, or have insufficient pressure in the tube to support the weight being held up, or both, then there's essentially nothing left between your rim and the ground surface but a layer of rubber, so a hard enough impact can damage a rim.
But as anon said, you can minimize the risk of damaging your rim by doing a couple different things:
1. make sure your tires are properly inflated before every ride
2. don't smash your wheel into gutters, learn to bunny hop
3. if you can't bunny hop, you can at least shift your weight to the front of the bike
4. use tires that are wider to increase the amount of compressible volume