How can I exit joining mode?
There is no join mode. When you join two mesh objects, they become one. The one that's last selected, the active one, survives, keeps it's values, the location of the object origin, rotation, etc. The other simply ceases to exist. It's mesh is integrated into the active object's mesh. There is no 'smashed vase' mode that you can leave to unsmash the vase.

A mesh can contain any number of unconnected mesh parts. Doesn't mean they are separate objects, not even separate meshes, just separate parts of a single mesh datablock. A single mesh can be a million faces, none of which touch each other.

You can select the sphere and hit P to seParate and remove it into its own object, but that creates a new object for the sphere to be in. It doesn't undo your joining. Join is a slightly destructive operation.

If you seParate a sphere, it might be useful to also change the object origin by setting it to geometry in the tools panel on the left.