I have read in a magazine that a star can actually form back to a planet... is it true?!
Does it mean all the planets in our galaxy can be revived back to what they were before?
No. This is not true.
A star is much larger than a planet. A star has nuclear reactions in its core, that prevent it from collapsing under gravity.
A planet is much smaller. It is small enough for "normal" pressure to be strong enough to stop gravity from making it any smaller, and there are no thermonuclear reactions at its core.
A star cannot form back to a planet. A planet cannot be "revived" back to a star.
(There is one class of bodies that may be star-like when young and planet-like when older: "Brown dwarfs". These are objects with a mass of 15-75 times the mass of Jupiter. These can support deuterium fusion when young, but not hydrogen or even lithium fusion, when the deuterium is used up they don't have enough mass to collapse to a dense stellar remnant, and so become "planet-like". Really they are objects sui generis, neither stars nor planets. Non of the solar system planets are brown dwarfs, and you can't revive a brown dwarf.)
To add to James K's answer, there are known examples of stars or stellar remnants that have been reduced to planetary masses due to mass transfer in close binary systems. An example is the so-called "diamond planet" orbiting PSR J1719-1438, which is likely the remnant core of a carbon-oxygen white dwarf which lost its outer layers to the neutron star, leaving behind an object roughly the mass of Jupiter while spinning up the neutron star to become a millisecond pulsar. The title of the discovery paper by Bailes et al. (2011) is "Transformation of a Star into a Planet in a Millisecond Pulsar Binary".
Whether these should be referred to as planets could be seen as debatable: while PSR J1719-1438 is listed in the NASA Exoplanet Catalogue, these kind of stellar remnants are a completely different type of object to the ones usually considered planets. On the other hand, you could make similar arguments for other objects in the exoplanet catalogues: e.g. the terrestrial-mass objects orbiting the pulsar PSR B1257+12 (which might themselves be the result of a white dwarf being disrupted by a neutron star, see Margalit & Metzger 2017), or the population of superjovians at very wide separations from their host stars which might represent either planets scattered onto wide orbits or very low mass brown dwarfs.