In harry potter magic is an inherent quality that some people have and can wield through mental exertion. Everything that wizards do is a way of focusing that exertion and making it less random/more successful.