So... "im" evolved as a contraction of the preposition "in" and the dative article "dem", which is used for neuter and for masculine.
Mein Schlüssel ist im Auto.
My key is in the car.
The German articles used to actually be demonstrative articles, and they are still used as a weakened version between "this" and "that". If they are used as such, they are not contracted.
Mein Schlüssel ist in DEM Auto. (possibly accompanied by a finger gesture)
My key is in this/that car.
If you fail to contract something then it simply sounds as if you want to point at something. That can be confusing but it's not a big problem.
Finally, there is a good load of expressions that use "im". Saying "in dem" would sound really weird and might destroy the idiomatic feel. Some examples:
im Sommer, im Laufe des Tages, im Großen und Ganzen, im Wesentlichen, im Prinzip
Lastly, not every English "in" will translate to "im" or "in" in German and vice versa.