We consider an action of a finite-dimensional Hopf algebra on a non-commutative associative algebra . Properties of the invariant subalgebra in are studied. It is shown that if is integral over its centre then in each of three cases will be integral over (the invariant subalgebra in ): 1) the coradical is cocommutative and char , 2) is pointed, has no nilpotent elements, is an affine algebra, and , 3) is cocommutative. We also consider an action of a commutative Hopf algebra on an arbitrary associative algebra, in particular, the canonical action of on the tensor algebra . A structure theorem on Hopf algebras is proved by application of the technique developed. Namely, every commutative finite-dimensional Hopf algebra whose coradical is a sub-Hopf algebra or cocommutative, where or , is cosemisimple, that is, . In particular, a commutative pointed Hopf algebra with or will be a group Hopf algebra. An example is also constructed showing that the restrictions on are essential.