Stars are basically giant clouds of gas. What makes them special is that these clouds have become so massive that their hearts beat with an untold number of continuously firing nuclear fusion reactions, wherein lighter elements are being fused into slightly heavier elements, and the resulting energy of this reaction is being burned off through the rest of the star into space. This is happening at a massive scale, and it makes stars very hot and very bright. This is the kind of thing that lets the Sun keep Earth nice and temperate at its distance of about 150 million kilometers, and which also lets it bake the bejeezus out of Mercury at about a third of that distance. It is this process of outward radiation that also keeps a star's mass from collapsing in on itself.
This, as all things, however, must someday end. Eventually a star's store of nuclear fuel will become depleted, and it will emit less and less energy as the fusion furnace inside runs out, as it were, of gas. Eventually, the radiation produced by the weakening fusion reaction will no longer be sufficient to support the star's materials against the relentless pull of gravity. When this happens, the star's materials will collapse inward into itself, and this will happen relatively quickly and painfully. When a star collapses, the rush of matter coming inward causes a huge release of gravitational potential energy outward, causing the outer layers of the star to be heated and pushed out in a terrible explosion. This is called a supernova. A star can burn, and I'm not kidding here, for billions, maybe hundreds of billions of years. A supernova fades over weeks. In a galaxy the size of ours, this might go down about every 50 years or so.
At the core of the supernova, inside the explosion of matter and energy that remains afterward (called a "remnant"), is most likely to be the bulk of the star's once-great matter store, compressed in on itself under crushing gravitational forces. The star has been reduced to about 1/600,000th of its former size, and yet has maintained much of its previous mass. This is more or less like taking an Olympic-size swimming pool and squeezing all the water into a gallon jug. This thing is dense. It is called a neutron star.
Remember how stuff spins in this universe? The pre-supernova star was spinning, and this neutron star is also still spinning. In physics you learn about a little thing called conservation of angular momentum. If something is spinning, absent the intrusion of external forces or changes in mass, it'll keep spinning with just as much energy as before, even if you change its size. The classic example of this is the figure skater, who starts a spin rotating slowly with limbs splayed out, but draws its limbs inward and begins to rotate faster and faster, without benefit of adding any force to the spin. This is angular momentum at work. Our own Sun rotates once maybe every 25 days or so. A neutron star, with similar mass but now wicked smaller, can have a rotational period measured in milliseconds. That's a fast spin.
The matter of the star is not the only thing spinning, however. Also spinning along with it is the star's magnetic field, generated because not everything in the star is spinning at a uniform pace. Particles of matter are all mixed up in there, interfering with each other and forming a magnetic field, just like Earth's core does. A rotating magnetic field tends to emit radiation from the poles of the spin. A really fast rotating magnetic field tends to emit a lot of radiation from its poles. Moreover, the axis of these rotating magnetic fields may not line up exactly with the axis of the spin of the actual body, just like Earth's magnetic north is not the same as it's axis-of-spin north. So if you imagine a sphere spinning, and then imagine that offset from its axis of spin, it is also jetting out streams of radiation into space, you would see two beams coming off this sphere, opposite from each other, but wobbling around as the sphere rotates. In this way, those beams of radiation continue to sweep the universe in small circles, very quickly but very regularly. Sometimes it happens that one of these beams will, every so often in its progression around this circle, be pointed at Earth. If it points at Earth once, it will point there again and again in regularly scheduled intervals as the neutron star continues to rotate -- once for every rotation of the neutron star, maybe every second or so -- maybe more, maybe less. We call this a pulsar.
Pulsars emit a lot of radiation. The first pulsar ever discovered was shooting out electromagnetic radiation in the radio wave range, which is of lower frequency than what we call light. Since then, pulsars have been found to emit radiation also in the X-ray and gamma ray ranges, which are of higher frequencies than light rays.
Recently, NASA's Fermi Gamma-ray Space Telescope discovered a heretofore unknown kind of pulsar which emits radiation only in the gamma ray range. It's about 4,600 light-years away from us, and its star probably went supernova about 10,000 years ago. Because it emits radiation only in the gamma range, it was otherwise "invisible" to us, since it radiated nothing we normally detect from pulsars: no radio waves, no light, no X-rays. And yet there it sits, nestled in the spray of bits of dead star shell that remain from its original supernova, spinning around about three times every second, emitting about 1,000 times the energy of our own Sun. Anything approaching it would be cooked in an unbelievable torrent of heat and radiation. Anything surviving that and making it in close would be ripped into its component particles just by the massive gravitational field this thing is sporting; remember, this thing was born in a supernova, and with more mass or less volume, it would basically just have collapsed into a black hole. It is a formidable force.
And yet, were it not for some yahoo sitting up one day and saying, "Hey, let's sweep the skies for gamma rays. Who knows what might turn up!" we might never have known of its existence. 10,000 years ago, perhaps a young Mesolithic man looked up one night from chipping his stone axe blade and gazed into the night sky. Maybe one star had puffed into a dim cloud, for a time outshining its neighbors, a pale smear on the normally stark, black background of the night. Gradually this strange sight would fade, as the energies released by the explosion of the star's death dissipated off into space. It would be replaced by emptiness, a hole in the sky where a star once burned, its absence ignored amid its sea of neighbors still shining, its grave marked only by its corpse, as massive as in life, but only a tiny fraction of its former size, a beacon raging energies into the universe with the force of a thousand suns, but shining only a terrible darkness that could never be seen again by human eyes.
It's a big universe out there, everybody.