The quick check: air, brakes, chain
A common shorthand for a pre-ride check is ABC: air, brakes, chain. It covers the things most likely to go wrong on a ride. Do it before every ride. Once it becomes a habit, it takes only a few minutes, and it is easier to catch a loose quick release or a flat tire in your driveway than at the bottom of a hill.
Work through the bike in the same order each time so nothing gets skipped.
Tires and pressure
Check each tire against the pressure range printed on its sidewall. Press the tire with your thumb: a tire that feels soft or squashy needs more air. Look over the tread and sidewalls for cuts, bulges or exposed cord. A damaged tire should be replaced, not ridden on.
If you do get a flat on the road, how to fix a flat bike tire explains the steps for the roadside.
Brakes
Squeeze each lever firmly. The bike should slow and stop without the lever reaching the bar. Check that the pads sit on the rim or rotor and not on the tire, and look for pads worn down to their wear marks. If a lever feels soft or the cable looks frayed, deal with it before you ride. How to adjust bike brake cable tension covers the adjustment, and how to tell if brake cable is frayed explains what to look for.
Wheels and quick releases or thru axles
Lift the front wheel off the ground and spin it. It should turn freely and stop without rubbing or wobbling. Do the same with the rear wheel. Check that each quick release is closed with the lever fully pressed and that it leaves a firm mark on your palm. If you use thru axles, check that they are fully tightened. How tight should bike quick release be explains what firm means in practice.
Steering, stem and handlebars
Hold the front brake and rock the bike gently back and forth. You should feel no knocking from the headset. Try to twist the handlebars while holding the front wheel between your knees. The bars should move only with the wheel. Check that the stem bolts are tight and that the handlebars are not loose or cracked.
If you feel a knock you cannot explain, check the headset with more care. How to check bike headset for play explains the test.
Saddle and seatpost
Check that the saddle does not rotate or slide. Make sure the seatpost is at the height you set and does not slip down under your weight. A saddle that moves under you is a safety issue as well as a comfort one, so tighten the clamp as the bolt allows and check it again on the next ride.
Drivetrain and shifting
Shift through the gears while standing still or pedaling gently. The chain should move smoothly, without skipping or grinding. Look at the chain for rust or grit. If it looks dry or dirty, how to clean and lube bike chain explains the next step.
Making it a habit
Do the check the same way each time, and do it before the ride rather than during it. Keep a pump, a spare tube and a basic tool kit where you can reach them. If you find a problem you cannot fix right away, do not ride the bike until it is sorted out. Walking a bike home is a much better outcome than a crash.