Both the mitochondria and chloroplasts (in plants) of eukaryotic cells contain their own genetic information.
This is leftover from what is thought to be a symbiosis in early eukaryotic cells. It is assumed that these organelles were originally completely separate organisms, which found their way into larger organisms' cells due to the advantageous symbiotic relationship they could offer each other. Having compartments in cells turned out to be a massive evolutionary advantage, as it meant more complex, more specialised and more efficient reactions could take place in different organelles, where the conditions could be varied to suit the enzymes.
Although much of the DNA (genetic material) that was originally in these organelles has now found its way into the host cell's nucleus with the rest of the cell's DNA, there is some still left in the organelles. Indeed, they still produce a few proteins themselves using this genetic material, but they also require the other proteins that are synthesised in the rest of the eukaryotic cell.