The idea is you have a widget on the back of the main tank called an overflow, which is like a pool skimmer. Water goes in and flows from the main tank down a hose to the sump and/or refugium which usually sit inside the stand. You have all your heaters, skimmers, etc down there so they're not an eyesore, and a pump that returns the water back up to the main tank through another hose. In my system I have no external filtration other than the skimmer. Just a whole lot of live rock, and all my flow comes from the sump return pump. Hard-core people put big sumps in their basement and run pvc pipes through their walls to their tanks.
Flow through the overflow is regulated by the tank level, which is in turn regulated by the pump. As long as all components work there won't be a flood. You have to make sure the water level in the sump is low enough so that if your pump fails and the water decides to go down the up-escalator, it won't flood the sump.
Having a sump has a few more advantages for an octo tank because there are less places where cords and things are passing through the tank lid--less escape routes. It also makes water changes easier and less stressful on the critters upstairs. A sump will also allow you to have a greater volume of water, which means a more stable system. Downsides include additional cost (a good pump isn't really cheap, nor is a good overflow) and sometimes it takes a little creativity and patience to eliminate gurgling noises.
Cuttle's right, reef central is a good place to go to learn more. It took me a long time surfing the internet to really conceptually understand how these components work, I hope we're helping make it easier for you!
Dan