Here A is a cause and B is an effect. If A and B are two billiard balls, making one hit the other is a perceptible and predictable event. Quantum physics was born in the beginning of our century out of the observation that a few things could not be explained without a detour from the traditional above board process of Newton to include an additional dimension under the table. A photon is a particle of light because it cannot be split into finer particles. These two behaviours are totally different from Newtonian physics since waves are non material and particles are concrete.
Light somehow can act like one or the other depending on circumstances.
To see light as a wave is done with a prism that breaks white light down into separate wave lengths that are observed as colours of the rainbows. But also if you turn light down until the smallest possible amount of light can come out, it comes as a particle instead of a wave. No dimmer switch is capable of this but physicists have broadcast light so that it exposes its graininess and photon status. In this unknown or imperceptible realm not covered by Newton's laws, the transformation takes place. Nature sets up its laws so that light can be either A or B, and both are kept inside the boundaries of the same reality below the table by building in a point of transformation for each one.