How does the wheel paradox work?
the smaller wheel does not just rotate, but also slides. If you had cogwheels instead of smooth wheels, you'd notice that movement is not possible.
That picture confuses things by making it look as though the red line is being "unwound" from the circle like paper towel being unwound from a roll. Our brains pick up on that, since it is a real-world example.
Both circles complete a single revolution, and both travel the same distance from left to right. If these really were rolls of paper towel, the smaller roll would have to spin faster (and therefore complete more than one full revolution) in order to lay out the same length of paper towel as the larger roll. Alternatively, if the two rolls were spinning at the same rate, the free end of the strip of towel left behind by the smaller roll would also move to the right.
In short, the image is a kind of optical/mental illusion, and you're not going crazy :)
As e.James mentions, the amount of red line laid out by the inner wheel is twice the circumference of the inner wheel. So the impression that the inner wheel is rolling out the red line is an illusion. In actuality, the inner wheel slips as it rolls out the red line. The slippage is hard to see since the only fixed reference that appears on the inner wheel is its radius that follows its rotation, and its radius only comes near the line on which the wheel is rolling at the ends of the line.
I have isolated the inner wheel and placed a second wheel just below it which actually rolls out a red and green line in a proper length-for-length manner. Watching the two together, makes the slippage more noticeable.
${\hspace{4cm}}$