St Ignatius of Loyola—the founder of the Society of Jesus commonly known as the Jesuits—was born in 1491 as Íñigo López de Loyola. Íñigo was a nobleman and a soldier from Loyola in the north of Spain whose early life can be described as one of loose living.
As a soldier in 1521, Íñigo found himself in a battle with the French in Pamplona, northern Spain. During the battle, a cannon ball smashed through the citadel wall he was defending and seriously wounded his legs.
The French soldiers initially tended his wounds before carrying him back home to Loyola to recover.
While recovering Íñigo asked for books to read that fit his interests: shivery, nobility, courageous acts and such. However, the only books available to him were The life of Christ and stories of the Saints.
He spent his time thinking about wooing women and acts of chivalry once he had recovered. But he also thought about devoting his life to God and imitating the courageous acts of the saints of his reading. In doing so he noticed a difference in how he felt after his imaginings. Setting his mind on 'worldly' things left him feeling dry and desolate. But setting his mind on 'holy' things left him feeling joy and consolation.
When Íñigo recovered he set out on a pilgrimage to Jerusalem. On the way he stopped off at Manresa (near Barcelona) and spent many months in prayer and reflection on his inner experiences. He began to recognise and discern the inner movements that lead him closer to God (consolation), and those that drew him away (desolation).
The eventual fruit of this period was the Spiritual Exercises; a little manual wrote by St Ignatius to help a Spiritual Director lead a person through a series of prayerful reflections on the life of Christ, which he hoped would help others avoid the pitfalls he had fallen into.