Changing a mountain bike tire is very similar to changing a regular bicycle tyre. The difference is the size and how the tyre detaches from the rest of the bike. This is especially true for the rear tyre on a mountain bike, because of the derailleur and chain wrapping around multiple gears.
Turn the bike upside down and loosen the axle nuts -- normally 15 mm (5.8 inch) in size -- and either remove a brake shoe or loosen the cable to the brakes so they relax.
Remove the entire wheel from the bike. If it is the rear wheel, twist the derailleur gently toward the rear of the bike to loosen the chain, then carefully remove the chain from its gears and place on the frame of the bike.
Remove one side of the tyre from the rim using the flat blade screwdriver. Place the screwdriver between the rim and the tyre bead and work your way around the circumference until the entire bead is off the rim.
Pull the old tube out, being sure to remove the air stem cap beforehand because it will not fit through the stem hole in the rim. Run your hand carefully along the inside of the tyre to make sure there are no thorns or sharp objects protruding that will ruin the new rim.
Install the new tube in the reverse of Step 4, being careful not to twist it inside the tyre. Once the tube is nestled in, replace the tired bead into the rim and put the air cap on so the stem will not disappear back into the hole during reassembly.
Put the wheel back on the bike and tighten the axle nuts. If it is the rear tyre, place the rim into the axle slots in the frame, replace the chain onto the gear, then slide the wheel the rest of the way in. Add air to the manufacturer recommended PSI level and installation is complete.
Since you have the wheel off, it is a good time to see if the bearings need greasing.
Don't let the chain drop to the ground or leave the derailleur on the rear of the bike. Do not puncture the new tube when installing it into the wheel and tyre set-up. Do not add too much air. Make certain the axle nuts are tight enough so that the wheel won't fall off when riding.