The Citadel is a large space station in Mass Effect.
This article contains major spoilers for every release of Mass Effect. You have been warned.
The Citadel is located in open space in the Serpent Nebula, with a mass relay nearby. The closest inhabited star system is the Boltzmann system, which is a moderate distance away by mass effect FTL drive.
Little is known about the function of the Citadel in previous galactic cycles, but it is known that it typically becomes the center of the galactic government, and that this function is intended by the Reapers.
The true origins of the Citadel are hidden from most of the races in the galaxy. A race known as the Leviathans created an artificial intelligence, later known as the Catalyst, with the task of finding a way for organic species and the artificial intelligences they created to coexist peacefully. The Catalyst concluded that peaceful coexistence was impossible, and that to preserve life in the galaxy advanced races should be cyclically "harvested" before creating an artificial intelligence capable of destroying them. The biological material of harvested races is used to create Reapers. The Catalyst instructed the Reapers to create the Citadel and the mass relays to better facilitate this periodic harvesting, and at some point installed itself on the Citadel. The Citadel is maintained by apparently non-sapient organic creatures known as the Keepers, which are capable of performing complex tasks.
Sapient races typically discover mass effect technology left behind by harvested races from previous "cycles", leading them to discover FTL drive and the mass relay network. Discovery of the mass relays inevitably leads races to the Citadel, which typically becomes the center of a galactic government. Newer races typically assume the races from the last cycle are responsible for constructing the Citadel and the mass relays, never realizing the truth until it is too late.
The full technological capabilities of the Citadel are unclear, but it is known to be capable of functioning as an enormous mass relay capable of summoning the Reapers from their hibernation area in "Dark Space" outside the galaxy. After each harvest, the Reapers would leave a vanguard which monitors the progress of galactic civilization. Upon galactic civilization reaching a certain threshold, the vanguard would signal the Keepers aboard the Citadel to activate its mass relay functionality. The Citadel can also exert control over other mass relays, allowing the Reapers to block other traffic through the relay network. As the Citadel usually becomes the seat of galactic government in each cycle, immediately striking the Citadel would allow the Reapers to deal a crippling blow at the start of each harvest.
Before their harvest, the Protheans were on the verge of understanding and reproducing mass relay technology. They had an experimental one-way mass relay known as the Conduit installed to connect the Citadel and the planet Ilos. A group of Prothean scientists hid in cryogenic stasis on Ilos during the harvest. After the Reapers returned to dark space, the scientists used the Conduit to enter the Citadel. They altered the Keepers so they would no longer respond to the Reaper vanguard's signal to activate the Citadel's mass relay functionality. The Reaper vanguard would be forced to physically connect to the Citadel in order to activate that functionality.
When combined with a large mechanism known as the Crucible, the Citadel is capable of using the mass relay network to accomplish one of three tasks. It can either release a pulse that destroys all artificial intelligence in the galaxy, absorb an organic mind which then takes control of the Reapers, or it can modify organic and synthetic life into a new, unified framework referred to as "Synthesis". How it accomplishes any of this is never clearly explained. Using the Crucible and the Citadel in this way creates great strain on the mass relay network, significantly damaging it.
By unspecified means, the Reapers were able to relocate it from the Serpent Nebula to Earth orbit.