As you may have already seen, light sometimes behaves as a wave and sometimes as a particle. This is due to something we call "wave-particle duality" by which we mean that objects on the quantum scale (atoms and smaller) exhibit both of these types of properties. For example, during the photoelectric effect, light behaves as a particle and knocks electrons off atoms, creating a current and providing us with the fundamental basis for building a solar panel. At other times, during diffraction for example, light demonstrates clearly wave-like properties wherein it spreads out like ripples on a pond. Exactly why this is is quite comlplex and due to the quantum mechanics governing such systems, but the basic idea is that photons of light act in different ways depending on how they interact with matter and how they are observed.