A ritual is a procedure that has a magical effect.
Rituals aren't spells (though some rituals have spell-like effects, and some rituals may even have the same or similar effects as certain spells). A ritual doesn't use up a spell slot and doesn't need to be prepared like a spell. (Some rituals, however, require the casting of one or more spells as part of the process of performing them.)
Rituals encompass many sorts of things which are only loosely related to each other. Specific rituals, or specific categories or types of rituals, may have properties that other sorts of rituals don't share. However, there are some things that are true of most or all rituals.
Each ritual has various defined aspects or characteristics, which usually includes a particularly procedure that must be followed, and various specific components that must be provided.
Rituals are not class features of a particular class (though they may have requirements that may only be fulfilled by characters of some classes). Rituals are usually not limited in how many times they may be performed per day (though many rituals take a long time to perform, and there are only so many hours in a day).
In some cases, magic items, spells, or other magical effects can make rituals easier to peform, often by (effectively) lowering certain requirements of a ritual, or taking the place of certain required components.
The effect of a ritual comes about at the ritual's completion, unless stated otherwise. (Some rituals have magical effects that begin to take place during the ritual's performance, while others have delayed effects that follow the ritual's completion after some time.)