Take a circle of radius r whose centre lies at distance R from a fixed axis, with R greater than r, and rotate it about that axis. The surface swept out is a torus. Two numbers describe it completely, and the ratio between them decides whether it looks like a bicycle tyre, a bagel, or a doughnut with barely any hole at all.
Mathematically it matters chiefly for what it is not: a sphere. The two cannot be deformed into one another without cutting, because the torus has a hole and the sphere does not, the torus is a surface of genus one, and noticing that this is a real, unremovable difference rather than a matter of shape is one of the starting points of topology. On a sphere every closed loop can be shrunk to a point. On a torus there are loops running around the hole and loops running through it that can never be shrunk away.
The same object turns up in places that look unrelated. It is the shape of the space in games where walking off one edge of the screen returns you at the opposite edge. It is the natural home of any system with two independent cyclic variables, which is why it appears constantly in mechanics and in the study of dynamical systems, where motion on a torus is the standard picture of two coupled oscillations.
Its geometry was studied early. Perseus, a Greek geometer of around 150 BCE, investigated the curves produced by cutting a torus with planes parallel to its axis. These are the spiric sections, named from the Greek word for the ring, and the family includes the hippopede and the Cassini ovals. They are the toric counterpart of the conic sections, and they are considerably harder, which is roughly why they are less famous.