Great answers so far! To add some more detail:
White Dwarfs are also composed of whatever elements remained in the star's core, after it shed its outer layers. It will contain a lot of heavier elements as a result of using up most of the available hydrogen and then moving on to fusing other elements that were previously produced in the core (carbon, oxygen, maybe neon). As others mentioned, white dwarfs are what is left behind when a star swells up into a giant at the end of its life, and sheds its outer layers, leaving only the core.
Neutron Stars on the other hand, are entirely different, even though they are also the remains of a star's core. In this case it's the result of a supernova from a more massive star. You can almost think of them as failed black holes, since not enough mass remains to compress the material down below the Schwarzchild Radius (the size of the event horizon, were it to become a black hole). To simplify it a bit, their density is high enough that gravity takes over and crushes subatomic particles together, fusing electrons and protons together to form neutrons. This results in a ridiculously dense core of neutrons that are packed together as tightly as they can be, like one giant atomic nucleus. This material is often referred to as
Neutronium. At the Neutron Star's surface there will be a crust of less dense matter, typically iron and other heavy elements produced in the supernova, and in the core during the star's later stages of life. They're only about 10km in radius and have roughly double the mass of our sun. Yeah. Let that sink in. As the
wikipedia page explains, a normal sized matchbox of neutronium at that density would have a mass of about 3 billion tonnes.
As others have said, both types are no longer engaging in fusion, and all of the remaining heat and light emission is due to residual heat (both), and heat generated by continuing gravitational collapse (in the case of the white dwarfs). And to some degree, neutron stars can gain energy by eating other stars, or accretion discs of material.
(As an aside, astronomers use "dwarfs" for the plural. It was Tolkein that came up with "dwarves")