마술 means "the art of producing illusions as entertainment by the use of sleight of hand, deceptive devices, etc."
요술 means "any extraordinary or mystical influence, charm, power, etc."
마술 is used for a scientific trick
요술 is used for a mysterious phenomenon