We study theoretically the interplay between magnetism and topology in three-dimensional HgTe/MnTe superlattices stacked along the (001) axis. Our results show the evolution of the magnetic topological phases with respect to the magnetic configurations. An axion insulator phase is observed for the antiferromagnetic order with the out-of-plane Néel vector direction below a critical thickness of MnTe, which is the ground state among all magnetic configurations. Defining T as the time-reversal symmetry, this axion insulator phase is protected by a magnetic twofold rotational symmetry C2⋅T. We find that the axion insulator phase evolves into a trivial insulator as we increase the number of the magnetic MnTe layers, and we present an estimate of the critical thickness of the MnTe film above which the axion insulator phase is absent. By switching the Néel vector direction into the ab plane, the system realizes different antiferromagnetic topological insulators depending on the thickness of MnTe. These phases feature gapless surface Dirac cones shifted away from high-symmetry points on surfaces perpendicular to the Néel vector direction of the magnetic layers. In the presence of ferromagnetism, the system realizes a magnetic Weyl semimetal and a ferromagnetic semimetal for out-of-plane and in-plane magnetization directions, respectively. We observe large anomalous Hall conductivity in the presence of ferromagnetism in the three-dimensional superlattice.