In order to discover the real nature of light the scientists discovered that light travels in the form of waves.
After performing some more experiments scientists came with a conclusion that light also exists in the form of particles. The true nature of light also confused the scientists.
Finally, the modern quantum theory emerged which stated that light is neither a wave nor a particle but it shows both the characteristics. Always remember the light cannot show both the characteristics together either it will show the wave characteristic or its particulate nature.
light is thought of both particle and wave because some concepts of light like diffraction, interference and others can be explained by thinking of light as a wave and on the other hand concepts like reflection and refraction could be explained only by thinking of light as a particle.
Also, for your clearance I want to explain the word particle which I used a lot in this answer. The term particle refers to photons. They are the elementary particles that define light.