A broken bike pedal can typically be replaced with a new pedal. The repair involves removing the damaged pedal using a pedal wrench or hex key and installing a compatible replacement pedal by screwing it onto the crank arm, observing the correct threading direction for each side.
The bike chain slipping off when changing gears is likely caused by chain slack, misalignment of derailleur or chainring, or worn components. Adjusting chain tension, indexing the gears, and inspecting wear can help fix this issue.