Does light travel in a straight line? If so, does this contradict the fact that light is a wave?
It is commonly stated that light travels in a straight line in a homogeneous medium. However, light is also a kind of wave; waves oscillate and they do not travel in a straight line.
Do these two statements contradict each other?
Initially, I thought the statement "light travels in a straight line" was incorrect and light only appears to (but actually does not) travel in straight lines due to its extremely short wavelength, making the oscillations invisible to the human eye. However, after some research, I found that the statement is indeed considered correct.
light is also a kind of wave; waves oscillate and they do not travel in a straight line.
Electromagnetic waves (light) travel with an electric and magnetic field which are oscillating perpendicular to each other and perpendicular to the direction the light ray is traveling. It moves in a perfectly straight line (in free space with no gravitational fields) which can be defined by the Poynting vector $$\bf S=E\times \frac B \mu$$ i.e., the vector cross product of the electric and magnetic field vectors.
Do these two statements contradict each other?
No. Using the link that Ghoster included in his comment, it is important to note that the red and blue line represent the oscillation of electric and magnetic fields and not the physical movement of the light ray.
Light is a wave. Maxwell's equations tell you how the wave propagates. It can be curved.
Ray optics is an approximation. In most cases, it is a good approximation. Rays are lines perpendicular to the wave fronts. A point source of light emits spherical waves. The rays are straight lines that originate at the source. A plane wave has parallel rays. Ray optics is good enough to do most lens design.
If you solve Maxwell's equations for a laser cavity, you usually get a Gaussian beam. The rays follow hyperbolic paths. In the far field, they approximate a spreading cone. But the divergence angle is very small, typically a few milliradians.
Another place you might see bent light is if you pass a beam through a pinhole. This is called diffraction. You will also see it if light passes through a slit or near a single edge.
You can think of the aperture of a lens as a very large pinhole. This causes a small amount of diffration. Usually imperfections of the lens design or manufacture cause larger problems. But some (expensive) lenses are so well designed and made that diffraction is the biggest problem. These are said to be diffraction limited.
Light does not necessarily travel in straight lines although it frequently does or appears to. This is not a contradiction. In classical physics light is known to follow a path of least time. This is called Fermat's Principle.
Fermat's principle was initially controversial because it seemed to
ascribe knowledge and intent to nature. Not until the 19th century was
it understood that nature's ability to test alternative paths is
merely a fundamental property of waves.
In modern times modern times we consider light taking the path of least action. Light, as with all electromagnetic waves, can have its path distorted by all sorts of effects. The most popular is by strong gravitational fields.
One of the most relevant though is the atmospheric refraction of light which most definitely causes light to "bend" as it travels because of changes in atmospheric density and local composition.