Android is a free operating system mostly developed by Google. Unfortunately, the drivers for most devices and most applications from the "market" are non-free. This page collects information about running an Android system as free as possible.
The Operating System
CyanogenMod is the most popular aftermarket distribution for Android. It runs on many phones and offers features not found in the official Android based firmwares of vendors. It also ships without Google applications and gives you more freedom over your device. CyanogenMod is Free Software developed by an active community. It still requires non-free device drivers and firmware which are fetched from a device and are included in the ROM.
In order to install CyanogenMod, your device needs to be rooted, but that is something that you probably want to do anyway. Some manufacturers consider your warranty void when your device is rooted. The Wiki of CyanogenMod contains detailed instructions on how to install it.