To get to Real de Catorce, you need to catch a bus from the town of Matehuala (M$95, 1½ hours). These leave Matehuala's bus station at 8am, midday, 2pm and 6pm. Matehuala is easy to reach from elsewhere in the region, with multiple daily connections from San Luis Potosí (M$247, three hours) and Querétaro (M$515, 5½ hours).
On arrival in Real, buses stop on the outskirts of town before the Ogarrio tunnel. There, in order to pass through the tunnel to the town proper, you change to a smaller bus that takes you the final part of the journey, dropping you on the market square.
Returning from Real to Matehuala, the small buses leave the market square in Real at 7:40am, 11:40am, 3:40pm and 5:40pm (M$88, 1½ to two hours), and once again passengers pick up the bigger bus on the other side for the rest of the journey. Buy tickets on board the bus.
If driving from Hwy 57 north of Matehuala, turn off toward Cedral, 20km west. After Cedral, you turn south to reach Catorce on what must be one of the world's longest cobblestone roads. It's a slow but spectacular zigzag drive up a steep mountainside. The 2.3km-long Ogarrio tunnel (M$30 per vehicle) is only wide enough for one vehicle; workers stationed at each end with telephones control traffic flow between 7am and 11pm. If it's really busy, you'll have to leave your car at the eastern tunnel entrance and continue by pickup or cart. If you drive through, as a nonresident you are supposed to leave your car in the parking area where you exit the tunnel, rather than park in the narrow streets of the town.