Medieval pilgrimage was a way to atone for one's sins, a way to grow spiritually, a way to seek healing, and a way to get the heck out of town.
Pilgrimage began in the first centuries of Christianity, when the faithful from communities all around the Mediterranean decided to travel to Jerusalem, to "see the places where Christ's feed trod," as one writer put it. Pebbles from various holy sites would be brought home as souvenirs. Even after the Muslims took over the Holy Land, Christian pilgrimage to Jerusalem continued.
Rome was the other major pilgrimage goal in the early Middle Ages, to the extent that the popular Old French term for pilgrims was "Romies," even if in fact they weren't headed for Rome. Here one could visit the tombs of Saint Peter and Paul, perhaps get a glimpse of the pope (revered in the abstract as Peter's successor, on whom see more here), and pick up the bones of a purported martyr in the catacombs.
By the eleventh century, another major pilgrimage destination emerged, Santiago in northwest Spain. This was where Saint James, Jesus's brother (or step-brother), had supposedly died after taking ship in the Holy Land, and sailing the length of the Mediterranean and up the Atlantic coast. (Iago is the same name as rendered as James in English.)
Major pilgrimage routes quickly became established all across western Europe, leading to Santiago. The best known starting point for this trip was Vézelay, in Burgundy (the interior of this early twelfth-century church is shown above). The monks of Vézelay claimed to have the bones of Mary Magdalene. She had supposedly also taken ship from the Holy Land, but unlike James she put in at the Riviera. According to the monks of Vézelay, she was not suitably appreciated there, which is why they brought her bones to where they could be properly revered.
The Santiago pilgrim's route is still popular today, though few walk the whole distance (there are, I hear, regular buses to take modern pilgrims over the Pyrenees and across the long and dusty miles of northern Spain). Medieval pilgrims, however, walked the whole thing, planning on about twenty miles a day. Given that a lot were ill and going to seek healing, this is quite impressive.
Pilgrims on the way to Santiago wore badges in the shape of a cockleshell, the saint's emblem. Churches on the pilgrimage route were built with very large enclosed porches, where pilgrims would sleep on the floor.
Someone accused of a crime could often get out of their richly deserved punishment by taking off on pilgrimage. Fulk Nerra, count of Anjou, went as a pilgrim to Rome five times, staying away until the excitement blew over (from such peccadillos as killing his wife).
Initially what we call Crusades were referred to as pilgrimages. Those going on the journey wore the sign of the cross, rather than a cockleshell. These armed journeys to the Holy Land were indeed treated as opportunities to see the land Christ's feet had trod, as well as to kill Muslims.