In order to cast a patronus charm, a witch or wizard needs to focus upon a single happy memory and feel as happy as possible while recalling it. The mechanism of this would be one using their frontal lobe to produce and focus upon a single positive thought. This thought produces an emotion, and emotions are energy. Our emotions cast chemical signals into our environment. Our emotions are measurable – this is how animals can sense our fear. They can sense the quality of the vibration around us; different emotions have different vibrations. Happiness is a high vibration emotion; it exists at a higher frequency than negative emotions like anger.
Therefore, I would describe a patronus as a semi-material form of the energy of happiness. And since animals can sense our emotions, it would make sense that a patronus could scare of dementors.