Beyond the baster... How does IUI work?

Er
So after over a year of TTC and 3 rounds of clomid we've decided to move forward with IUI next cycle. I know they spin down the sperm and inject them high up into your tube but how is that better than just having sex? What else should I expect? For those that have done it? Was it painful?