When you aim a light sourse to a mirror, it gets reflected in the following way:
the angle of incidence respect to the perpendicular of the mirror's surface (if the mirror was the upper part of the letter T, the perpendicular would be the vertical stick, since it cuts it with an 90 degree angle) is equal to the angle of reflection. so if you aim it at 45 degrees, it would get reflected 45 degrees the other way, adding to a total of 90 degrees (which would make the light go up. (or a vertical light source become horizontal, so a submarine operator can see the surface).
in a periscope, they also add another mirror so that the light coming from the surface gets reflected, goes downwards, and then turns horizontal for a crew member to see.!!!