You can freely move ships around between D-Ships and all the fleets that are present at a world at the beginning of a turn. This is called a transfer.

Transferring ships to a fleet does not capture the fleet. Instead, transferring ships to a fleet you don't own will just give the ships away. Sometimes you want to do this (for instance, to give ships to an ally). If you transfer ships to an unowned, empty fleet key, you will create a neutral fleet, which is almost always a mistake.