That's what's called chain suck - when the chain "sticks" to the chainrings and therefore gets pulled (sucked) up and jams against the frame.
It's usually caused by worn chainrings which develop a broadened front, which jams into the chain links when pedalling firmly. It will often only show when a new chain is fitted. Some brands of chain can be more forgiving than others of chainrings worn in this way.
It can also be caused by undue pedal pressure during front downshifts - there is too much tension on the chain and it can engage firmly on the smaller chainring while still being firmly attached to the larger chainring. Changing down with less pressure on the pedals will usually alleviate this problem.If you're in an uncomfortably high gear and need to downshift but don't have the momentum to ease the pedalling force, downshift on the rear sprockets first (they'll handle a bit more pressure than the front during shifts) before downshifting on the front.