In telescopes and camera lenses, resolution will be proportional to the caliber of its objective lens. This is why we create huge telescopes. In microscope lens, we don't use the word caliber and use the word NA instead. It is an indicator of how much light from the specimen will be lead to objective lens. Higher NA lens has higher resolution.
Immersion oil has same refraction ratio with glass.
In high power objective lens, the distance between outer lens and cover glass gets very small and the light from the specimen will reflect by total internal reflection. To avoid this and get larger NA for better resolution, special oil is used for the medium between cover glass and the lens. This oil is arranged so it will have the refractive index of 1.516 and this number is exactly the same as those of optical glass. That makes light not to reflect or bend in each contacting surface. You can see the ice in water because the refractive ratio is different between ice and water.