A UBEC is a switching regulator to efficiently convert your battery voltage to 6v. The regulator in the ESC is linear and heats up a LOT on anything over 2s. As far as hookup, check out the diagrams here.
I have run the cheapo chinese ones that UH sells, and the ccbec. The ccbec is alot less "noisy", so placement of it is not so critical. The cheaper ones may require some moving around on the chassis to get the best performance/least interference. For the price the ccbec is great.
From testing various UBECs, the Hercules HV, Koolflight, and CCBEC are at the top of the list. Each have their strong points. The cheapie ones have caused issues for me in the past.
Hercules HV BEC: Up to 60v input, high efficiency, VERY low noise, 3.5A rating (verified). Expensive, but built very well.
Koolflight: Solid performer, VERY low noise, high efficiency, etc. A little large and pricey, but well built and doesn't fail.
CCBEC: High current, programmable voltage, high efficiency, and very good price. A little noisy at high loads and only handles 6s (25v).
Cheapie ones: Test out ok, VERY cheap, efficiency on par with typical switching regulators. Tends to be noisy and has caused my Spektrum Rx to "reboot" on occasion.
The funny thing is that the Koolflight and cheapier regulators use the same exact component at the heart of the circuit. But the choice in support components on the KF are superior, and the larger size makes for better thermal performance.