You gain a +3 bonus to attack and damage rolls made with this magic weapon. In addition, the weapon ignores resistance to slashing damage.
When you attack a creature that has at least one head with this weapon and roll a 20 on the attack roll, you cut off one of the creature's heads. The creature dies if it can't survive without the lost head. A creature is immune to this effect if it is immune to slashing damage, doesn't have or need a head, has legendary actions, or the GM decides that the creature is too big for its head to be cut off with this weapon. Such a creature instead takes an extra 6d8 slashing damage from the hit.
Proficiency with a longsword allows you to add your proficiency bonus to the attack roll for any attack you make with it.
Notes: Bonus: Magic, Damage, Combat, Versatile
how do you get it
I don't know
If you use the dms guide, then it is one of the magic items you can get. I had a fighter, and I just happened to roll crazy high and end up with this beast