What are butt plugs actually for?

I’m browsing for some sex toys and have come to the realization that I have no idea what a butt plug is for. Should I be using one before sex? And if yes, why? What are the benefit?

Is the teardrop shape the best one? When I search on Amazon all kinds of plug shapes come up…