What's difference between 1/2 and 9/16 inch pedals? I've this bike MTB hardtail Marin Bolinas Ridge 2012.

And it has generic composite pedals which I want to change.

So while choosing pedals I saw two different choices, 1/2 and 9/16 inch pedals.

I didn't understand what does this sizes mean and apply to what.

Please if someone can explain it to me.

For example: Diamondback Sound Pedal 9/16 and 1/2 model
The measurement is for the diameter of the pedal spindles, where they thread into the cranks. You need to find out whether your existing pedals' axle is 9/16" or 1/2". If there is no measurement indication on your existing pedals or the paperwork which came with your bike, ask your LBS if they could test out with some existing pedals to find out what size you need.