Mountain Bike Gear Shifting

How do you shift gears on a mountain bike?
i have a question. so i just bought a 6 gear bike and i dont know what is the proper way to shift gears. for example, should i pedal then stop pedaling then shift gears, or should i pedal and continue to pedal as i shift.
BAsically what is the proper way to shift gears. like how do i pedal and stuff too. thx for your gracious help.
Pedaling, moving the chain shifts the chain. Shifting the rear’s usually easier under load, and will be more smooth than trying to shift the chainring under load.
Pedal and shift, continue pedaling lighters load effort eases the tension on the chain allowing an easier smoother chain movement.
how not to shift your mountain bike gears.

