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 <a href="https://glowing.com/glow-fertility-program">IUI</a> 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?