First of all, you have to learn the basics of computer and networks architecture, communication protocols, realize how an operating system works, etc., in order to understand more complex subjects and interact giving precise instructions to the calculator, at first to carry out common operations, until you get to comprehend the error existing, breaches in a system and ultimately know how exploit them.
At school you'll not learn last things mentioned, but the basics to reach them, most often it's done self-taught, but if you'll meet a good master, work will be better and simpler.
Good luck.