as i understand it
return pipe, returns water back to the tank from sump via a pump
overflow pipe takes water from tank to sump
water returned to tank then usually flows ot ouf tank through an overflow box/weir via a hole in tank or a syphon setup as described if no hole available