Albert Einstein studied the photoelectric effect. First, he began by shining ultraviolet light on the surface of a metal. When he did this, he was able to find electrons being coming from the surface. This was Einstein's explanation: If the energy in light comes in bundles, then you can think of light as containing packets of energy, or photons. When these particles strike a surface, they transfer their energy to electrons. Once freed, the electrons move along the metal or get ejected from the surface.
Einstein said that:
All matter exhibits both wave and particle properties.
An electron is a particle and a wave at the same time.
To summarise, there are two ways in which it can be proven that light behaves like a particle and a wave, in a double-slit experiment and using the aforementioned photoelectric effect. In the former, the apparatus is set up like this:
Here, when the light passes through the two slits, it creates an interference pattern. When electrons are fired through the two slits, the expected result would be a random pattern, however, it actually creates an interference pattern similar to that which light produces.
You take light, and shine it through a very narrow slit, and then shine that light through two very narrow slits, very close together. You then observe the result of this on a screen. Ff light is really made up of particles, then the particles should pass straight through the slits and produce two light stripes on the screen, approximately the same size as the slits. (Just like the ping-pong balls in the picture above.) On the other hand, if light is a wave, then the two waves emerging from the two slits will interfere with each other and produce a pattern of many stripes, not just two. (This is the interference pattern)
So to summarise, is light really a wave or a particle? The fact is that the true nature of light defies imagination, because it's not quite like anything we can see. Under certain conditions, such as when we shine it through narrow slits and look at the result, it behaves as only a wave can. Under other conditions, such as when we shine it on a metal and examine the spray of electrons that comes off, light behaves as only particles can. This multiple personality of light is referred to as wave-particle duality.
The next question, asked by Louis de Broglie, was "If waves can behave like particles, can particles behave like waves?" In the case of light, exposing the particle properties was simply a matter of using the photoelectric effect).
They aimed a beam of electrons at a crystal, and observed the electrons that were reflected off it. If the electron beam can behave as a wave, then as the wave is reflected off the crystal, the rows of atoms should have the same effect as the slits in Young's experiment. The result is that instead of the electrons being scattered from the crystal randomly, the reflected electrons exhibit an interference pattern like the light in Young's experiment.
The result was that the electron beam was reflected like a wave, rather than like particles. They concluded, that wave particle duality is a property not only of light (photons), but of matter as well.