A torus is a 3D (three-dimensional) object.
Understanding the Dimensions of a Torus
While the surface of a torus is 2-dimensional in the sense that you can describe any point on the surface with just two coordinates (like latitude and longitude), the torus itself exists and is embedded in 3-dimensional space.
According to the provided reference, "In geometry, a torus ( pl. : tori or toruses) is a surface of revolution generated by revolving a circle in three-dimensional space one full revolution about an axis that is coplanar with the circle." This definition clearly states that the torus is generated and exists within a 3D space.
Why the Confusion?
The potential confusion arises because a torus is a surface. Surfaces, in general, are 2-dimensional objects. However, the torus as a whole shape requires three dimensions to exist. Imagine trying to create a donut shape (which is a common example of a torus) on a completely flat, 2D plane; it's impossible without introducing depth, which is the third dimension.
Example
Think of a sheet of paper. It's thin, so it's often considered 2D. However, the paper itself exists in the real world and occupies a tiny amount of space in the third dimension (its thickness). Similarly, the surface of a torus is 2D, but the torus itself exists as a 3D object.