These flatworms, Pseudobiceros hancockanus, are hermaphroditic, meaning they have both egg-producing ovaries and sperm producing testes. Because of this, when it comes time to mate, they will fight to decide who will be the mother and the father.
This is because it is more costly, biologically, to be the mother than the father. Being the mother requires many more resources in time and energy, whereas the father can just go on with his life. So to decide who's who, they fight.
The flatworms have a mating behavior best described as 'penis fencing.' They try to pierce each other's skins with their penis. The winer, then is the one who manages to inseminate the other. The sperm is absorbed through the pores in the skin and the loser becomes pregnant.