A flat doesn't mean a trip to the shop. With two tire levers and a pump, you can be riding again in half an hour.
Difficulty: Moderate. Plan on 30 min.
Safety: Check the brakes work before you ride.
Affiliate links: As an Amazon Associate I earn from qualifying purchases. Buying through these links costs you nothing extra. Prices and availability are shown on the store's site, and you can buy these anywhere.
Check the brakes work before you ride.
Shift to the smallest rear cog if it's the back wheel, open the brake if needed, and remove the wheel.
Let out any remaining air. Hook a tire lever under the tire bead, pull it over the rim, and run a second lever around to free one side.
Pull the tube out. Run your fingers carefully around the inside of the tire to find and remove whatever caused the flat.
Patch the tube or fit a new one. Put a little air in it, tuck it into the tire, and push the bead back on by hand.
Inflate to the pressure printed on the tire sidewall, check the tire is seated evenly, and reinstall the wheel.
Nice work. A new fix shows up every day, and the Fix Ladder has step-by-step guides for common home repairs.