What else is in the tank?
It looks like someone tried to bite its head off. It might have even got its head caught on something, possibly when trying to swim through a gap.
If there is nothing big in the tank and it didn't get caught on something, then it is either a protozoan or bacterial infection. Monitor over the next 24-48 hours and if it gets worse then treat with broad spectrum medication or salt. Guppies can tolerate high levels of salt but it depends on what other fishes are in the tank.