Are TENS machines effective for pain relief?

What is TENS and does it actually work?