First of all, you need to examine the tire of your bike. If you see a large hole in the tire, you can’t do anything to repair it and have to replace it with a new one. If only the air tube is has a hole in it, you can fix it easily.
Turn the bike upside down and rest it on the handlebars and seat. You can use blocks of wood or bricks to support the bike in that position.
Closely examine the tire by rotating it and look for anything sticking out of it, such as a nail, thorn, piece of glass, screw or any other object. Pull it out if you see any such thing.
Take out the bike’s tool kit and look for a tire valve tool to take out the remaining air from the tire. You can use a matchstick or a toothpick to serve the same purpose.
Take the tire levers to pry the tire off the metal rim. Insert one lever between the tire and the rim, while use the other lever to pry the rest of the tire.
Take the tube out of the tire carefully, ensuring not to entangle it with other parts of the bike.
Inflate the tube with a pump so you can detect the spot of puncture. If the hole is too tiny to detect air coming out of it, you can insert the tube into water to locate it.
Mark the hole with a chalk, marker or a small sticker and then deflate the tube.
Your tool kit must have a metal rasp within it and you have to buff the punctured area of tube with it.
Spread a small quantity of glue around the hole.
Take a puncture patch and peel off the plastic back from it. Carefully place it directly over the puncture and press it firmly with your hands. You can also use a small hammer to pat the puncture so that the patch firmly sticks to the tube.
Put the tube back in the tire. Pry the tire back onto the rim carefully and pump air into the tube to finish the job.