Expecto Patronum or the Patronus Charm creates a shining silver guardian in the form of an animal called a Patronus. These animals often have significant meaning to the caster, such as a precious memory or connection to the caster. For example, in the original canon, Harry's Patronus was a stag, signifying the connection Harry felt with his father. In order to cast a Patronus, the caster must focus on a positive memory or feeling designed to drive fear away. This is later explained by Harry as people subconsciously shielding themselves from the fear of Death, as he correctly deduces that Dementors are in fact a physical manifestation of Death and humanity's fear thereof. Thus, the Patronus is designed to shield the caster from the pain of the fear of Death. This is how a Patronus is able to confer protection from dementors, their primary purpose. However, a Patronus is also capable of locating other Patronuses or other people and can convey messages to people. They also generate light, variable on how powerful the Patronus is, as seen with Harry's vastly superior Patronus outshining even Dumbledore's. The difficulty in casting a Patronus comes not from challenging wand motions or even the total amount of magic in your body, but from mustering the mental willpower to face down fear itself and drive it away. Thus, it draws on emotions in addition to standard spell requirements.
The true patronus was discovered (possibly redicovered) by Harry Potter, when he finally understood that Dementors represent Death incarnate. His empathetic desire to protect all of humanity from the pain of that loss allowed him to not just drive away the fear of Death, but to conquer Death itself. This caused his Patronus to evolve into its true form; his Patronus took on the shape of an androgynous human. In this form, the Patronus gains additional abilities, including the ability to destroy Dementors and block the "unblockable" curse, Avada Kadavra. It also allowed Harry to restore Hermione's magical abilities when she was resurrected at the cost of a small amount of his own magic. This form of the spell is much more draining on the caster than the standard Patronus, as it draws on emotion and lifeforce and radiates it outwards, giving it its enhanced shine. If too much power is poured into this Patronus, it will utterly drain them and destroy them, as well as any Dementors in the vicinity. Harry Potter, after just having learned how to operate the true Patronus, was thought to be capable of destroying all of Azkaban's guards in a single use due to how powerful the spell is, though he wasn't sure if he would survive such an ordeal.