Three main options:
The South American Explorers booklet recommends 3 different routes:
The vast majority of hikers choose route #1, to the ruins and back. For an excellent idea of how this trip works, check the annotated photo trip report of contributing editor Rick McCharles.
Even better, we feel, would be to visit both Choquequirao & Machu Picchu in one long trek, with pack animals. That is option #2.