My pedals sometimes jolt forward unexpectedly, how can I fix this issue?

I am having an issue with my bike, where if I put too much pressure on the pedals while pedaling, they will "slip" or "jerk" forward with a loud clang. I'm not sure exactly what's causing it, but it feels as if the chain has "slipped" forward on the teeth of the gears, causing the pedals to jolt. This sometimes happens with enough force to nearly make me swerve or lose balance.

How could I go about diagnosing or fixing this issue?