Take the bowl off the bottom of the carb (with fuel shut off or tank empty). See the floating doughnut? That's the float. Attached to it is the fuel inlet needle. Works like your toilet tank. When the level of fuel is too low, the float drops. That moves the fuel inlet needle off it's seat, letting more fuel into the bowl. When the level reaches a sufficient height, the float pushes the inlet needle back into it's seat, shutting off the fuel supply.
When fuel is being allowed in to the point where it pours all over the place, one of a few possible problems has occurred. There might be a particle stuck to the needle tip or the seat, which prevents the fuel supply from being shut off when needed. The needle or seat could be damaged. The float could have a defect that prevents it from floating, such as a crack that is letting fuel into the float itself, buggering up its buoyancy. The float could be sticking, or the needle detached.
Have a good look it it, and clean the needle and seat carefully. Remove the float, and shake it close to your ear to hear if there is fuel in it.
One trick I use to check float operation- remove carb from engine (intact and with bowl on) and attach several inches of clean hose to it. Blow into the hose while holding the carb upright, then flip it upside down. Repeat a few times. You should NOT be able to blow ait into it while it's upside down.