We develop a general theory for active viscoelastic materials made of polar filaments. This theory is motivated by the dynamics of the cytoskeleton. The continuous consumption of a fuel generates a nonequilibrium state characterized by the generation of flows and stresses. Our theory applies to any polar system with internal energy consumption such as active chemical gels and cytoskeletal networks which are set in motion by active processes at work in cells.