In 1974, Claude Lovelace discovered that bosonic string theory could only be physically consistent if it were formulated in 25 spatial dimensions, but so far as anyone knows, we only have three spatial dimensions! Dimensions are the pieces of information needed to determine a precise point in space. (Dimensions are generally thought of in terms of up/down, left/right, forward/backward.)
Relativity treats space and time as a continuum of coordinates, so this means that the universe has a total of 26 dimensions in string theory, as opposed to the four dimensions it possesses under Einstein’s special and general relativity theories.
Einstein’s relativity has three spatial dimensions and one time dimension because those are the conditions used to create the theory. He didn’t begin working on relativity and just happen to stumble upon three spatial dimensions, but rather intentionally built it into the theory from the beginning. If he’d wanted a 2-dimensional or 5-dimensional relativity, he could have built the theory to work in those dimensions.
With bosonic string theory, the equations actually demanded a certain number of dimensions to be mathematically consistent. The theory falls apart in any other number of dimensions!
The reason for extra dimensions
The reason for these extra dimensions can be seen by analogy. Consider a long, loose spring (like a Slinky), which is flexible and elastic, similar to the strings of string theory. If you lay the spring in a straight line flat on the floor and pull it outward, waves move along the length of the spring. These are called longitudinal waves and are similar to the way sound waves move through the air.
The key thing is that these waves, or vibrations, move only back and forth along the length of the spring. In other words, they’re 1-dimensional waves.
Now imagine that the spring stays on the floor, but someone holds each end. Each person can move the ends of the spring anywhere they want, so long as it stays on the floor. They can move it left and right, or back and forth, or some combination of the two. As the ends of the spring move in this way, the waves that are generated require two dimensions to describe the motion.
Finally, imagine that each person has an end of the spring but can move it anywhere — left or right, back or forth, and up or down. The waves generated by the spring require three dimensions to explain the motion. Trying to use 2-dimensional or 1-dimensional equations to explain the motion wouldn’t make sense.
In an analogous way, bosonic string theory required 25 spatial dimensions so the symmetries of the strings could be fully consistent. (Conformal symmetry is the exact name of the type of symmetry in string theory that requires this number of dimensions.)
If the physicists left out any of those dimensions, it made about as much sense as trying to analyze the 3-dimensional spring in only one dimension . . . which is to say, none at all.
Dealing with the extra dimensions
The physical conception of these extra dimensions was (and still is) the hardest part of the theory to comprehend. Everyone can understand three spatial dimensions and a time dimension. Given a latitude, longitude, altitude, and time, two people can meet anywhere on the planet. You can measure height, width, and length, and you experience the passage of time, so you have a regular familiarity with what those dimensions represent.
What about the other 22 spatial dimensions? It was clear that these dimensions had to be hidden somehow. The Kaluza-Klein theory predicted that extra dimensions were rolled up, but rolling them up in precisely the right way to achieve results that made sense was difficult. This was achieved for string theory in the mid-1980s through the use of Calabi-Yau manifolds.
No one has any direct experience with these strange other dimensions. For the idea to come out of the symmetry relationships associated with a relatively obscure new theoretical physics conjecture certainly didn’t offer much motivation for physicists to accept it. And for more than a decade, most physicists didn’t.