CO2 and other gases are seperated from air by liquifying it. Each gas will boil off at a specific temperature. This is not practical at all for getting CO2 at home. Most CO2 is produced commercially by the decomposition of calcium carbonate at ~800 Celsius.
CaCO3 --> CaO + CO2
You may be able to set up a burner that will produce CO2. Burning any carbon-based substance (alcohol, gasoline, wood, leaves, coal, etc.) will convert O2 to mostly CO2 and H2O.
MB