Light rays are actually electromagnetic waves. There are oscillating electric and magnetic fields perpendicular to the direction of propagation of light.
The disturbance or the wave is always up and down about a straight line. That line is the axis of the wave. It is also the direction of propagation of the wave. For practical purposes, light rays can be taken as travelling in straight lines, where the dimensions of objects are in millimeters or more.
The wave character of light is important when we are dealing with particles of size in micrometers or less.
The electromagnetic waves have a frequency and wavelength. The disturbance due to light travels up and down in the form of a wave. So truly speaking light does not travel in a perfect straight line. The amplitude of oscillation of the light wave is very very small and is in micrometers.
When we work with objects and particles at the size of micro meters (quantum mechanics or molecular or atomic level dynamics), then we consider light as a wave.