The effect device (or function) called phaser is a member of the delays family. The classic phaser creates a similar effect to flanging (a flanger is in theory a specific type of phaser), the changes it evokes are merely not that powerful.
Originally, both effects were intended to mimic the late 1960s unbelievably spectacular effect which is produced when you run an identical signal simultaneously on two tape machines while slowing down one of the coils ('flange') over and over again. This would cause phase shifts (‘phasing’), until the synchronisation was gradually re-established. A few famous examples are the legendary guitar solo of Eric Clapton on “While My Guitar Gently Weeps” because Eric thought his contribution to a Beatles-song should sound less like his characteristic blues sound and much more Beatlesque. The end of “Bold As Love” by Jimi Hendrix also makes great use of the flange effect!
It was of course quite difficult to achieve this sound back in the day and it was impossible to do it on stage. However, clever minds tried to create the effect electronically and the first result of this process was the phaser.