it continues toward the fence it gets an electric shock from the collar. one or two hits from that, and they stay well back – just like pigs with electric fences.
when i mowed the lawn last week, though, i caught the wire with a wheel of the mower and broke it. the signal box beeps to warn you if the wire is broken, so at least you know straight away. 