This week, an earthworm called Dave has been exciting the British public.

That is because Dave has been measured at 16in (40cm) long, making him and her (we'll explain that later) the longest earthworm recorded in the UK.

But, and here is a phrase you may never have expected to read, earthworms get even more interesting.

Here are five more startling facts.

Earthworms grow much, much bigger

Dave the earthworm may have impressed the UK, including the researchers who measured him at the Natural History Museum in London. But at 40cm, he is a slip of worm compared to others around the world. There are a few species that can grow more than 3ft (1m) long.

Measuring the size of an earthworm is difficult, as their soft bodies naturally extend and contract, and it is easy to inadvertently stretch specimens.

But the largest earthworm in the world may be the giant Gippsland earthworm of Australia (Megascolides australis), a rare species found in just five locations. According to the Encyclopedia of Endangered Species, individuals reliably reach 6.6ft (2m) long, with a diameter of 4cm. Another species, the African giant earthworm (Microchaetus rappi), is also reported to reach lengths of 6.6ft (2m) or more.

Giant earthworms create mysterious mounds

Earthworms are renowned for shifting soil. But in South America, one species has been identified as the creator of a beautiful and mysterious series of mounds.

The Surales is a landscape of green mounds and deep pits, organised in intricate and regular patterns. They span many square kilometres, but these mind-boggling mounds were built by humble earthworms that grow more than 3ft (1m) long.

Even the way the earthworms build the mounds is a little odd. Over decades, the Andiorrhinus worms have stuck to rigid eating habits. They eat in flooded pits, and always poop in the exact same place.

Over time, their poop accumulates into large mounds up to 16ft (5m) across and 7ft (2m) tall. This discovery was only published by scientists in May 2016.

Earthworms have epic sex

When it comes to sexual stamina, earthworms have other species, including humans, easily beat. The common earthworm (Lumbricus terrestris) copulates for more than three hours at a time.

A 1997 study revealed that earthworms court each other by visiting each other's burrows, sometimes up to 17 times.

If that did not test their fortitude and energy reserves enough, each actual copulation lasts for 69-200 minutes. Scientists know this, because they have filmed the earthworms in action.

Parenting is complicated

Earthworms are hermaphrodites, with each individual containing both male and female sexual organs. When they mate, they compete to inseminate the other with sperm, and fertilise the other's eggs. That means Dave the earthworm may have been both mother and father to different offspring, passing on half of its genes to each.

But the complications continue.

In 2013, scientists conducted the first ever paternity tests on earthworms. They found that earthworms often have multiple partners, and the first and third earthworms to have sex with a partner are the most likely to sire offspring. Those that go second miss out, perhaps because their sperm has to wait in line to reach a holding vessel that has been filled by the first partner, and gets flushed away by sperm introduced by the third.

What's more, while some earthworms have long bouts of sex, other species appear to have done away with sex altogether.

The genitals of some Taiwanese mountain earthworms (Amynthas catenus) have degenerated. Instead they reproduce through virgin births or "parthenogenesis". That means they pass 100% of their genes to their offspring, producing clones of themselves. That makes them mother and father to each baby worm.

Like cows, earthworms form herds

And they make group decisions. According to research published in 2010, earthworms use touch to communicate and influence each other's behaviour.

By doing so the worms collectively decide to travel in the same direction as part of a single herd. The striking behaviour, found in the earthworm Eisenia fetida, is the first time that any annelid worm has been shown to form active herds.

The discovery suggests that earthworms are social animals, and their group behavior is similar to the herding or swarming of other species.

So the next time you pick up a worm up and toss it onto a compost heap, remember this. You may be wrenching it away from its friends.

Follow Matt Walker on Twitter at @byMJWalker.

Join over six million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.