Is cabin air freshened when a plane is taxiing or on the ground?
The aircraft when on ground and starts to board passengers is switched to ground power or auxiliary power which runs the air conditioning system. When disconnected, the engines supplies the power and bleed air for the cabin pressurization.

"On the ground, the airplane is unpressurized and the outflow valve is wide open. During preflight, the pilot sets the cruise altitude on a cabin pressure controller. As soon as the weight is off the main wheels at takeoff, the outflow valve begins to close and the cabin starts to pressurize."

Source - 
https://www.airspacemag.com/flight-today/how-things-work-cabin-pressure-2870604/