Winter is coming, and it will soon be time to put your bike away, safe from the cold and storms. If you store it properly, you'll have fewer problems when you bring it out again next year. A small amount of effort makes a big difference.
A clean bike is safe from rot and corrosion. Wipe the frame and wheels down, and remove any excess grease. Get any mud off the chain and gears. A soft-bristled brush is good for reaching into the tough spots and getting all the gunk out.
Lubricate the cables and the chain after cleaning. This will shield them against moisture and corrosion.
Make sure the tires are fully inflated. If the air is low, it will get lower over the winter. The tires will develop flat spots that will make them wear out faster.
If you have a garage or basement where you can keep the bike for the winter, that's great. If not, you might be able to prevail on a friend or relative with a bigger home.
If all you have is a small apartment, you should still be able to find a corner for it that's not too much in the way. Mounting the bike on a rack will keep it from falling over if it gets bumped. If you use a wall-mounted rack, make sure it will hold the weight without damaging the wall. Free-standing racks are available if you can't use a wall-mounted one.
Putting the bicycle on a rack for the winter, so it doesn't touch the floor, will keep the tires nice and round.
Secure bicycle storage facilities are available in some areas. Using one of them is a lot cheaper than renting an entire storage space.
Many resources are available for additional guidance. ThoughtCo presents a seven-step guide to getting a bike ready for the winter. Also take a look at this video on winter preparation from Global Cycling Network: