  The phase transition from normal hadronic matter to quark matter in neutron
stars (NS) could give rise to several interesting phenomena. Compact stars can
have such exotic states up to their surface (called strange stars (SS)) or they
can have quark core surrounded by hadronic matter, known as hybrid stars (HS).
As the state of matter of the resultant SS/HS is different from the initial
hadronic matter, their masses also differ. Therefore, such conversion leads to
huge energy release, sometimes of the order of $10^{53}$ ergs. In the present
work we study the qualitative energy released by such conversion. Recent
observations reveal huge surface magnetic field in certain stars, termed
magnetars. Such huge magnetic fields can modify the equations of state (EOS) of
the matter describing the star. Therefore, the mass of magnetars are different
from normal NS. The energy released during the conversion process from neutron
magnetar (NM) to strange magnetar/hybrid magnetar (SS/HS) is different from
normal NS to SS/HS conversion. In this work we calculate the energy release
during the phase transition in magnetars. The energy released during NS to
SS/HS conversion exceeds the energy released during NM to SM/HM conversion. The
energy released during the conversion of NS to SS is always of the order of
$10^{53}$ ergs. The amount of energy released during such conversion can only
be compared to the energy observed during the gamma ray bursts (GRB). The
energy liberated during NM to HM conversion is few times lesser, and is not
likely to power GRB at cosmological distances. However, the magnetars are more
likely to lose their energy from the magnetic poles and can produce giant
flares, which are usually associated with magnetars.
