Flat tyres are a fact of life when bicycling. Most bicycle tyres use inner tubes to keep the tire round and functional. Holes and punctures happen when the inner tube is compromised. To repair the tyre flat, fix the inner tube puncture. Carry a small inner tube patch kit to fix these pesky flats when riding.
Remove the wheel with the flat tyre from the bicycle. Most bicycles use quick-release levers to accomplish this. Push the quick-release lever down, and grip the brakes and pull the brake housing out to release the brake and pull the wheel out from the frame.
Sand the puncture area with the sandpaper from the patch kit. This makes the rubber rough so the glue has more pores to set into with the patch. Take one of the rubber patches from the kit and apply the adhesive from the kit to the back of the patch. Press the patch to the puncture area.