The Custodian was an immense and ancient computer on the legendary planet Aldea. The Custodian was created by the Aldean progenitors hundreds of centuries ago when the Aldean civilization achieved enlightenment and retreated from the rest of the Milky Way Galaxy.
The Custodian maintained the planetary defense system, including a planet-wide cloaking device and defense shield, as well as a powerful repulsor beam. The Aldeans could command it to perform many actions for them to provide all of their needs. The Custodian also gave the Aldeans recommendations on what a person should pursue or study, often an art of some sort.
The Custodian's main terminal was housed in a special room by transporter access. The Aldeans could also command it using devices attached to their uniforms, on the arms, for example, Radue and Rashella used these. The power room for the computer was attached, though was almost never entered.
The Custodian maintained clearances on all their people. For example, when the Aldeans kidnapped the children of the USS Enterprise-D, Wesley Crusher was registered in the computer and given level three clearance.
By the late 24th century, the Aldeans themselves had forgotten how the system worked or how to maintain it. This lack of knowledge, combined with the cumulative environmental effects of the system, led the Aldeans to misdiagnose the sterility affecting their species as a genetic disorder. When the ultimate cause was revealed as their planet's defenses, the Aldeans de-activated the cloak and shield and set about relearning their own technology. (TNG: "When The Bough Breaks")