We study the (2+1)-dimensional Dirac oscillator in the presence of an external uniform magnetic
field (B). We show how the change of the strength of B leads to the existence of a quantum
phase transition in the chirality of the system. A critical value of the strength of the external
magnetic field (Bc) can be naturally defined in terms of physical parameters of the system.
While for B = Bc the fermion can be considered as a free particle without defined chirality, for
B Bc) the chirality is left (right) and there exist a net potential acting on the fermion.
For the three regimes defined in the quantum phase transition of chirality, we observe that the
energy spectra for each regime is drastically different. Then, we consider the z-component of the
orbital angular momentum as an order parameter that characterizes the quantum phase transition