These instructions are for the rear wheel but you can use them for the front wheel too - just ignore the references to the chain and derailleur.
Shift the chain to the smallest cog
If you have them, loosen the quick release on the brakes.
Some common quick release set-ups.
Open the quick release on the wheel hub, pull the derailleur back to make room for the cogs to clear the chain, and remove the wheel by lifting it out of the dropouts.
If you don't have quick release, you will need to loosen and remove both the wheel nuts.
Lay your bicycle on the ground with the derailleur side up, to avoid getting dirt in the free wheel and chain. Do not stand the bike on the derailleur.