There's a few different ways of piping the water from tank to sump , most use a weir , this is so that should the pump stop the water above the pipes drains to the sump , If the pipes have access to all the water in the display , it will empty the display into the sump to the level of the pipes which in most instances is quite a bit of water and can cause the sump to spill over and flood hence the use of a weir to create a smaller amount of water . The weir also gives good surface break for gas exchange within the water .
Some pipes are drilled up through the bottom of the tank , which generally make an easier more direct route to the sump , but requires the weir box to go down to the bottom of the tank . With my own I went through the back due to where the supports in the stand are . Which enables me to have a high level weir box , the down side is that the tank won't go as far back to the wall with the pipes down the back . Another method I may look into in the future is mounting the weir box on the back and running a coast to coast style weir , which would be narrower and look neater in the tank .
As far as pipes the simplest way is two pipes within the weir at two different heights , the shortest or first exposed to water is the main drain , the other higher pipe would only spill over in emergency . The biggest problem with this style is that as the water drains it pulls air into the pipe giving a gurgling sound as you'd get with a household drain ,
From this a valve can be fitted to the drain pipe entering the sump , known as a Herbie overflow , this does two things throttling back the flow of water lifts the height of water in the weir and also causes the pipe to run as a Syphon which does not draw any air and runs quiet , the valve is adjusted to match the speed of which the return pump is pumping back to the display .
There is also another called the bean animal overflow which consists of 3 pipes which is has a 2nd emergency drain which has the ability to also self convert to a Syphon .
I'll add some links describing as my explanations probably aren't great Saltcorner: Article: DIY DURSO STANDPIPEHerbie Overflow Plumbing Guide for Quiet Reef Aquariums - gmacreef
BeanAnimal's Bar and Grill - Silent and Fail-Safe Overflow System