Protective Circles have been around for centuries from the Druids, to the Celts, to the Greeks, to the Egyptians. You can find remnants of Circles throughout history and stories told about them being used to ward off evil. These Circles are a projection of one's will power and personal boundaries to keep out negative energies. You can make the protective circle as strong as you wish for it to be; you are only limited by your imagination.
There are multiple ways to create a Protective Circle, however, this post isn't to focus on those ways but to talk about the mechanics of how they work. You can cast a Protective Circle with the elements or with simple salt and water, or by smudging your space. All of these ways are effective at keeping out negative energies, however, their degrees of strength vary. You would want to cast a stronger Protection Circle when doing full rituals involving spellwork versus just doing a simple meditation.
However, no Protection Circle will protect you if you are willingly summoning entities that could cause you harm such as demons, imps, faeries, etc. Some of these creatures can be helpful such as Fae folk but not all, and I would dare to say not even most, are here for your highest good. Even calling the Guardians of the Directions when you cast a ritual circle are considered you summoning them to your space. Unless you are specific and clear about what you are calling them for, then they will bring in all that you have allowed them too. Example:
If I am casting a ritual circle and calling upon the Guardians of the East, the powers of Earth, to come inside my circle without stipulations such as calling them for strength or grounding, then I am essentially letting them bring whatever they have to offer and that includes earthquakes and landslides. Same for if I am calling upon the West and the element of Water. Water may decide to bring in overly emotional baggage and drippy psychic influences along with hurricanes and tsunamis. This may seem extreme to some but don't underestimate the power of magic and the forces that you are dealing with.
If I call in the Fae folk to assist me with a spell and I don't tag on the phrase, "all those who are dedicated to my highest good" or something to that affect then I am inviting all the Fae of the world to come into my circle, the good, the bad, and the downright nasty. Be clear and specific about what you want. Negative energies are masters at finding loopholes in your wording and trust me, they will find them.
Protection circles, as I said, are extensions of your Will. If your Will involves you summoning anything into you space then you are using yourself as a gateway to allow those entities entrance past your protective barrier into your sacred space. Protective circles are only as strong as you are and are as effective as you allow them to be. Don't be flimsy with your magic otherwise your protection will be a reflection of that.