  We study the properties of the surface states in three-dimensional
topological insulators in the presence of a ferromagnetic exchange field. We
demonstrate that for layered materials like Bi$_2$Se$_3$ the surface states on
the top surface behave qualitatively different than the surface states at the
side surfaces. We show that the group velocity of the surface states can be
tuned by the direction and strength of the exchange field. If the exchange
field becomes larger than the bulk gap of the material, a phase transition into
a topologically nontrivial semimetallic state occurs. In particular, the
material becomes a Weyl semimetal, if the exchange field possesses a non-zero
component perpendicular to the layers. Associated with the Weyl semimetallic
state we show that Fermi arcs appear at the surface. Under certain
circumstances either one-dimensional or even two-dimensional surface flat bands
can appear. We show that the appearence of these flat bands is related to
chiral symmetries of the system and can be understood in terms of topological
winding numbers. In contrast to previous systems that have been suggested to
possess surface flat bands, the present system has a much larger energy scale,
allowing the observation of surface flat bands at room temperature. The flat
bands are tunable in the sense that they can be turned on or off by rotation of
the ferromagnetic exchange field. Our findings are supported by both numerical
results on a finite system as well as approximate analytical results.
