Physical quantities which are the ratio of the same type of quantities are unitless quantities.
The refractive index is the ratio of the sine of the angle of incidence to the sine of the angle of refraction. The sine function of the angle is a unitless quantity, hence the refractive index is also a unitless quantity.
The refractive index of medium 1 with respect to medium 2 is equal to the ratio of the speed of light in medium 2 to the speed of light in medium 1. So it is the ratio of the same type of quantities i.e. speed. Therefore, it does not carry any unit.