In physics, you expect that it doesn't really matter whether a number is rational or irrational. Physics measurements rarely have perfect precision. If you measure a number to be 0.750000, it sure looks like the rational number 3/4, but it may be just slightly different, after the sixteenth decimal place. Who can say?
But rational and irrational numbers sometimes make a difference.
Consider the case of two crystals. On the atomic level, the surfaces of these crystals are very bumpy. You would expect that when you place one crystal on top of the other, the bumps on the top crystal's surface would prefer to align with the grooves on the bottom crystal's surface. But what if the bumps on the top crystal and the bumps on the bottom crystal are spaced differently? Will one crystal squeeze or stretch to fit the other? Or will the crystals just lay on top of each other, bumps and grooves be damned?
As usual, we solve this problem by considering a simpler problem: a string of atoms sitting on top of a bumpy surface. The atoms behave like they are attached by springs. There is a preferred distance between two atoms, which we'll call distance A. You can push the atoms closer to each other by compressing the springs, or pull them apart by stretching the springs, but it requires energy to do so. It also requires energy to place an atom on a bump rather than a groove. The bumps are evenly spaced, with distance B between each bump.
At low temperature, the atoms will settle down to the lowest energy state. But the lowest energy state depends on the ratio A/B. Specifically, it depends on whether A/B is "nearly rational", or if it is "sufficiently irrational".
So let us first consider the case where A/B is nearly rational. For simplicity's sake, let's say A/B is near the rational number 1. Of course, if A/B is exactly one, then the atoms will all slide to the lowest points of the bumpy surface, and that's that. But if A/B is just a little different, then the atoms will still lie at the lowest points of the bumpy surface. It may cost a little bit of energy to stretch or compress the springs a little, but it would cost even more energy to have the atoms completely unaligned with the bumpy surface.
On the other hand, if A/B is too far from 1, then the energy cost of stretching or compressing the springs just to get all the atoms exactly at the grooves is too much. It requires less energy to just have the atoms evenly spaced, even if that means that they're scattered all over the groove structure from high to low.
The former scenario is called the commensurate phase. The latter scenario is called the incommensurate phase. You can imagine the ratio A/B changing (perhaps the bumps shrink as the temperature changes), leading to a phase transition between commensurate and incommensurate. Yes, just like the phase transition between solid, liquid, and gas. In condensed matter we talk about all sorts of subtle phases, and the phase transitions between them.
As for where exactly the phase transition occurs, you have to know something about the strength of the springs, the height and shape of the bumps, and which rational number is being considered. Bigger bumps means that the system is commensurate for a larger range of values of A/B. Typically,* the larger the denominator of the rational number, the smaller the commensurate range. So you can imagine that there is a large commensurate range around 1, a smaller range around 1/2, and an even smaller range around 7/9.
*This depends on the exact shape of the bumps. If the bumps are perfect sine waves, I believe most rational numbers don't produce any commensurate phase whatsoever.
But even though the rational numbers are densely packed on the number line, the commensurate phase does not necessarily cover all numbers. That may be hard for the non-mathematicians to grok, but imagine that the commensurate ranges get exponentially smaller as you include more and more rational numbers. If you sum up all the terms in an exponentially decreasing series (eg 1/2 + 1/4 + 1/8 + 1/16 + ...), you get a finite number. It could be the case that this number is less than the total length of the numbers we're considering. If that is the case, there must be some numbers which are not covered by any of the commensurate phases.
We call these numbers "sufficiently irrational." If A/B is sufficiently irrational, then the incommensurate phase is stable.
Of course, this only applies at absolute zero temperature, when there is an infinite string of atoms. In a real system, here's no need to consider rational numbers with denominators greater than the number of atoms. On the other hand, in a real system, there are about 10^8 atoms in a centimeter. On the other other hand, a nonzero temperature will kill a lot of commensurate phases, since the random motion of atoms would be enough to overcome the tiny amount of energy saved by being in the commensurate phase.
The complications of reality notwithstanding, I think it is mathematically beautiful to think of all these commensurate phases arranged in a fractal pattern.
This fractal pattern also appears somewhere else in physics--chaos theory. If the initial conditions of a system are nearly rational, the system may follow a completely different trajectory than if the initial conditions were sufficiently irrational. Since it's hard for us to know, with our imperfect measurements, whether a number is sufficiently irrational or not, the system may be unpredictable. That's what leads to chaotic motion.