A rivet is a fastener that holds something closed or down, and something riveting keeps you glued to your seat and grabs your attention. Sometimes a movie is so riveting that not even free popcorn refills can lure you away.
Riveting is an adjective for things that really draw you in, like a book you read in one sitting or a song you turn up so you can hear every lyric. Beautiful scenes are riveting, but terrible and ugly things are also riveting, like the site of an accident you can't stop looking at. Words from a teacher or actor have a riveting effect when they're full of impact and interest, and when you exaggerate a story for your best friend, that's riveting too.