Trouble joining two meshes together
The easiest way to do it is to:


Begin with a cube that you subdivide twice (smooth mode).
Cut off a hole on the bottom, select the hole, flatten it on the Z axis (SZ0.
Make it a circle ShiftAltS.
Extrude down to make the vertical cylinder.
Do the exact same operation for the horizontal extrusion.
Add some edge loops close to the edges you want to sharp.