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