How to dock
To dock with another ship or repair station you own, will need to do a few things.
First, you'll need to RIGHT click on the ship you wish to dock with.
You will then see a command menu like this to select from:

From this menu you click the button "Dock with this ship". You can also use this menu to see the status of a ship, change view to that ship, instructions, and much more.
Once you have docked with your ship, you will see a command menu with many more options.

You can now select to "Change command to this
ship", transfer cargo from one ship to another, undock, and all the other
more standard commands.
As well as these options... once you are docked you can tow this ship to a planet or repair station if it is need of fixing.
*Hint*
If your command ships engine is destroyed... you are very limited in what you can do with this ship. You certainly can't issue too many commands to your fleet!
Select another ship you own, and have it move close to your command ship. Select both ships, and only both ships. (see How to select multiple ships, to do this)
Then click on the other ship and select "dock". Once docked, transfer your command to the ship with usable engines.
Right click on the "old" command ship, and select dock. Then tow the busted ship to a planet, or station, for the needed repairs.