A flat tire or seat problem can occur at anytime when riding, so you need to be able to repair your bicycle on the fly. Part of repairing a bicycle on the fly is being prepared at all times. Carry around the essential tools so that you won't have to trudge home should you end up with a flat or a loose bolt.
A piece of broken glass or a rusty nail can spell trouble for you if you run over them on a bicycle. Since flats can happen anywhere, anytime, it's always a smart idea to bring the tools you need to change a tire with you, even if you are just riding down the street or to a friend's house. Bring an extra inner tube with you along with a portable tire pump. Unless you have quick release axles, you'll need an Allen wrench or multi-tool to take the wheel off. Since pulling the tire off of the wheel can be tricky, you may want to carry a tire lever too.
Stay calm and cool when changing a tire, even in the middle of a ride. It's a lot of work and can be difficult, so don't rush the project. As you remove the tire and inner tube, inspect both for damage. If a sharp piece of glass is embedded in the tire, you'll end up with a flat again in no time. Remove any debris from both the outside and inside of the tire.
When pulling the bead of the tire off of the rim of the bike or when putting the bead back in, be very careful. You do not want to pinch the tube between the tire and the rim, as you'll wind up with another flat.
If your brakes squeal every time you use them, it may be getting close to time to get new pads. Inspect the grooves on the brake pad. If you cannot see any, that means it's time to get new ones. If the grooves are still visible, but the brakes squeak anyway, clean the area to stop the squeaking. Give the metal rims on the wheels of your bike a cleaning and file the surface of the brake pads to remove any caked-on dirt that may be preventing them from functioning properly. You can use an emery board to file the pads clean, you don't need a fancy filing tool.
Bikes need grease to prevent damage. But too much lubricant and grease can make the bike dirty or prevent it from driving as smoothly as it should. To prevent wear on the bike, add lube at regular intervals. Always wipe away extra lube, especially from the drivetrain, to prevent build-up. Add a touch of grease to anything you can screw on and off, such as the bolt that holds your in place and the axles on the wheel. Well-oiled threads mean the pieces are easier to remove if you need to repair a bike on the road. You really don't want to break a seat bolt in the middle of a trail.