Two of the twelve apostles were named James. St. James the Greater is the brother of the apostle St. John and son of Zebedee and Mary Salome. He is "the Greater" because he was called to the apostolate earlier than St. James the Less, the "Brother of Jesus" who led the Christians of Jerusalem until that city's destruction in 70 AD. A tradition in late antiquity held that the apostles divided up the world into territories to be evangelized, with Spain falling to St. James. In the ninth century a Galician monk announced that a star had led him to a field where he found the remains of the saint. This "field of the star" became the city of Compostela, one of the most important medieval pilgrimage destinations.
Many images of St. James the Greater represent him as a well-equipped medieval pilgrim with an ample cape, sturdy boots, a broad-brimmed hat, and a walking stick with a hook for hanging a drinking gourd. The hat will be adorned with a scallop shell, which is in the nature of a heraldic device for the St. James; Compostela pilgrims have used it to identify themselves for more than a thousand years. Less literal portraits of the pilgrim saint may show him in the kind of antique garb associated with apostles, with the walking stick as his one irreducible attribute. A second iconographic type presents St. James as Santiago Matamoros -- St. James the Moor Slayer. This image recalls Ramiro of Castile's victory over the Muslims at the Battle of Clavijo (ca. 844). Christian participants in the battle said they saw St. James riding with them, slaying the enemy on every side. Santiago Matamoros became the patron saint of Christian Spain, and an iconography developed in which the horseback saint raises his sword in the midst of the fray, with dead and dying Moors at his feet.
More details about St James the Greater and pilgrimages to Santiago di Compostela in Spain on the website of Confraternity of St James