1. Be prepared with all the kit you need on the bike: a spare inner tube, tyre levers and a pump (or a CO2 cartridge with a nozzle adapter).
2. Take the wheel out of the frame and put the bike down safely off the road. If removing the rear wheel first, click the rear derailleur down so that the chain is sitting on the smallest cog. Loosen the quick-release lever on the brake caliper to allow the tyre out of the gap.
3. Remove one side of the tyre from the rim using the tyre levers. Start near to the valve and work away. Leave the tyre half on the rim and check the inner and outer skins for whatever caused the puncture. Remove the foreign object and check again – there could be more than one.
4. With all nasties out of the tyre, put a very small amount of air into the tube to stop it twisting and push it into the gap between tyre and rim. Make sure you line the valve up completely straight.
5. Push the beading of the tyre back into the rim, starting opposite the valve with two hands working in opposing directions, checking all the time that you are not pinching the tube under the beading.
6. Once the tyre is re-seated correctly, put the wheel back into the bike, securely fasten the quick release and pump the tyre up (or use the CO2 canister). Aim to get the tyre as hard as you can – or to about 100psi if you have a pressure gauge on the pump.