What does it mean to jailbreak/flash your iPhone?

I want a iphone 5 but i have tmobile and these bitches seem like the only company without a iPhone
so how does jailbreaking/flashing the iphone work
will it be worth it?
will the features work the same

Jailbreaking an iPhone is like messing with the main settings and rearranging coding. It's really not worth it I'm my opinion. I did it with my first iPod touch and it was cool at first because of new apps ( which were ok but not that good) I could get backgrounds ( I had a 2g iPod touch) but it made it so much slower. It lagged like crazy for me me. So if I were you I wouldn't do it.