Even after the tail comes off, it can still move around and wriggle as if it’s alive due to spasms in the nerves. This confuses predators into thinking the tail is another lizard, giving the now tail-less reptile a few moments to make its escape. This process is called autotomy, or self amputation.
Lizards are able to regrow their tails too. The trauma of losing the original, bony tail stimulates cells to start growing a new one from cartilage.