The sutras that he is credited with authoring are thought to have been written down anywhere from 200 BCE to 200 CE. Patanjali is not considered the originator of yoga—the practice of yoga is much older, dated by some scholars as early as 5000 BCE. But Patanjali’s yoga sutras are considered by many to contain the essence of yoga--a distillation of the yoga spiritual technology written down in a simple, accessible manner to encourage each of us to find our Authentic Self, God within, and in so doing experience the peace that "surpasses all understanding."
As far as we know Patanjali was not a religious leader. He proposed no theology, no dogma, wrote no creeds nor sacred texts, nor founded a religious community. In fact Patanjali, in the yoga sutras, despite living in the ancient world of the Indian subcontinent, does not describe any religious practices at all-- neither Hindu nor Buddhist. He does acknowledge that worship is one path to spiritual growth (Sutra 1.23) but adds that we are free to worship the God of our heart. (Sutra 2.44.) Not sure about what you believe? No worries--Patanjali encourages seekers to then meditate on anything that they find life affirming. (Sutra 1.39.)
Despite this rather cavalier attitude towards religion, inherent in the yoga sutras is the assumption that the Supreme Creator, God (Ishwara) already abides in each and every one of us as the "Seer" (Purusha). Seer is often translated and understood as pure consciousness or our Authentic Self, our soul. The sutras assert that our biggest obstacle to experiencing this truth of God within is our misidentification with our own endless internal narrative (called vritti in Sanskrit and often translated as mind-stuff modifications). These yappy little thoughts in and of themselves are not a problem. The problem lies in our attachment to them, to our own ego-centric, selfish version of reality. To reconnect us with our Authentic Self, Patanjali's sutras describe practices that seek to remove the obstacles that keep us stuck in the small self. These practices are called yoga.