Science is the enterprise that builds and organises in the form of testable explanations and predictions about the natural world. Given their lack of magical aptitude, Muggles are naturally inclined to science as wizards are to magic, although magic is experimented with in a scientific manner. Severus Snape described potion-making as a subtle science.
Magic within the Harry Potter universe is certainly treated like a science. Wizards and witches conduct all sorts of experiments with their magic, and all magic schools teach a systematic approach to magic, similar to Muggle sciences.