If you haven't spent time preparing to cast spells, they will not work. In order to learn how to cast, you have to spend time studying what is called "The Basics". These involve meditation, grounding, centering, visualising, and some more. It is rather like trying to drive a car with no fuel if you are not prepared.
You can use the search bar at the top of the page to find plenty of threads on the basics. Good luck :D