Merging two cube meshes
There are many, many ways of going about this.

Possibly the fastest for this particular case:


W> Bridge edge loops
Edge select mode (&#9096; Ctrl&#8633; Tab)
Deselect edge ring (&#9096; Ctrl&#9095; Alt&#8679; Shift RMB)
&#8998; Delete> Delete edge loops




For two spheres you might do something like this: