I am making something that automaticaly unlocks a door but everything is fine and communication works, the DC motor I use can turn around, but it is not powerful enough to turn the key.
I searched on the Internet and I found some different kinds: DC, stepper, gear…
Which motor do I use best (so it is powerful enough but not that big) and what are the differences between these kinds of motors?
If you can tell us what motor you've tried, how much torque you need to "turn the key", what power you have available to run the motor and how big "not that big" is you might get a better answer.
At moment my best guess is you need a better motor. Or perhaps just more power to the original motor.
I have 5V available and I tried a DC motor (the one in the basic arduino kit) and I want a motor that's almost the same size, so I want a kind of motor with more torque than speed.
The easiest way to get more toque and less speed is usually by gearing the motor. Have a look at Types of Motors | Adafruit Motor Selection Guide | Adafruit Learning System for a general guide to motors.
I think the motor in "the basic arduino kit" is a 280 size but I've never actually seen one. If you Google "geared 280 motor" that might help.
If I buy a geared motor for 12V but I only use 5V would it work, but at half of speed and torque?
This way I just need to buy one motor and then I can use it for different projects with different voltages.
Probably. If you keep reducing voltage at some point the motor will just refuse to start up (not enough torque to overcome the initial inertia to get it moving). But they're generally o.k. on fairly low voltages provided the load is not too great.
So you'll have to check it for yourself. General answers when you don't refer to a particular motor always involve some guesswork.
Speed would be 5/12ths approx.
Nominal torque would be the same, as that's dependent on the current in the windings which is thermally
limited for continuous running.
Max torque (stall torque) would be about 5/12ths at 5V compared to 12V, as that depends on the
resistance of the windings.
By the way motors without gears generally have a torque dependent on motor volume (for
similar motor types), this is a laws-of-physics thing.