Actually, that's not true. They may seem similar, but they aren't.
Magic involves secrecy and mystery. From the stage magician who distracts the audiences eyes away form what he’s really doing, to the sorcerer who uses cryptic chants that the listener can’t understand. Magic is all about the hidden. It relies (claims to rely) on forces from other worlds or dimensions.
Miracles, on the other hand, reveal. No sleight of hand. No mysterious forces.
The goal of magic is to glorify a person. The goal of a miracle is to glorify God.