Bike pedals attach to your cranks with a bolt thread for quick installation or removal. To prevent pedals from unscrewing as you ride, the left pedal, on the non-drive side of the bike, is threaded in reverse. You’ll need to tighten it by turning your wrench counterclockwise, the opposite direction from a normally threaded bolt. The phenomenon that causes pedals to loosen is called “precession,” which causes the bolts to unthread in the opposite direction from what you might expect. Even though it seems your pedals ought to unscrew as you ride, the direction of the thread will keep both pedals snug.
Removing Old Pedals - Tie a cloth strap tightly around one crank and the chainstay of the bicycle. This prevents the other crank from rotating as you loosen the pedal. It doesn't matter which pedal you remove first.
Loosen the pedal using an Allen wrench inserted into the pedal's spindle from the inside of the crank arm. On most modern pedals, there should be a corresponding tapped hole. If there isn't, use a pedal wrench to loosen the pedal using the flat part of the spindle, located between the pedal and the outside of the crank arm. The right pedal will loosen counterclockwise, and the left pedal will loosen clockwise due to the reversed thread.
Use your foot to apply additional leverage on the wrench. If your pedals are stubbornly stuck, you can use the cloth strap to brace the opposite crank arm against the chainstay and apply additional leverage using your body weight. Apply pressure slowly until the stuck pedal releases. If your pedals are too corroded to be removed, you may need to have a bike shop drill out the old pedals for replacement.
Installing Pedals - Lubricate the threads of the pedal's spindle and the inside of the crank arm threads. Grease or lubricant will prevent corrosion from locking the bicycle pedals in place.
Screw each pedal in place using an Allen wrench or pedal wrench. The right pedal will tighten clockwise, and the left pedal will tighten counterclockwise. Your bicycle's chain should prevent the crank arms from spinning as you tighten the pedals if your wheel is on the ground, but you can secure the opposite crank arm with a cloth strap or your hand for additional leverage.
Tighten each pedal firmly and securely. Use a good amount of leverage to tighten each pedal to prevent it from unscrewing as you ride. Check that each pedal is rotating smoothly, and ensure there's no cracking or damage to the pedal before you ride.