That's not what it is - see:I still do not understand how electromagnetic spectrum with different wavelengths of a photon particle can be explained as a particle with a wave function, separate but from the same particle
What happens is the EM quantum field interacts with something and that interaction, in some cases can be explained as if its particle like eg when seeing a flash on a photo-multiplayer screen,
Sometimes it's like a wave as well as shown by the usual interpretation of the double slit - although IMHO that is not the best explanation:
Note the above, like the usual explanation is not quite right either - just better than the usual one IMHO:
To make it even worse the above it not the full story either. Physics can be maddening lke that.
Either way best to forget this so called wave-particle duality - its one of the many myths about QM out there: