So, I'm pretty sure Ron is trying to intimidate you by stating he's my brother, so, sorry
Knowing of a spell isn't the same as being able to cast it. As Ron said, to be able to do so involves wand movement, motivation and proper phrasing. Spells can also be cast non verbally as well. Not quite sure on how that works but I've seen it happen.
Anyway, as for how spells came to be, they were discovered. Like Muggle things. They might have always existed, but they had to be discovered. Does that make sense? People can also create them. I'm sorry if this isn't really helpful.
Like I said, I wasn't here when the spells were put into place here, but there is a spell that might reveal them. If anything it will reveal the secrets and magical properties on the complex.