A nuclear reactor was a self contained apparatus that produced energy through controlled nuclear reactions. Fission reactors that used uranium to create controlled nuclear chain reactions and produced energy used to power other technologies, typically large planetary installations or cities. Smaller reactors used to power vehicles were commonly called nuclear fission reactors.
The energy was created by sending a slow neutron though the center of an atom of uranium. With the relative large size of an atom of uranium, it could not handle one more neutron, so it split and sent out neutrons to the other atoms, and started the process over again. This reaction was explained by the theories of Albert Einstein.
Uncontrolled nuclear reactions were used in nuclear weapons, and occasionally a malfunction or misuse in a nuclear reactor could also produce damaging effects.
By the 20th century, technology on Earth was advanced enough for societies to construct fission based nuclear reactors to power whole regions.
The PXK pergium reactor was an example of a nuclear reactor. It was used in the 2210s, but was out of common use by the 2240s. Due to an essential part being stolen, a PXK reactor was to go supercritical in ten hours and irradiate half of the planet Janus VI. (TOS: "The Devil in the Dark")
Fusion reactors worked on a different principle. Instead of trying to split atomic nuclei, fusion bonded smaller lighter elements together, the relativistic mass converted, produced enormous volumes of energy.