You can form two ships into a fleet by moving one onto another.
Note however, that your empire has a "Logistics" limit that caps the size of a given fleet. Each ship has a Logistics size (with bigger ships having a bigger Logistics cost), and the sum of the Logistics sizes for the ships in a fleet cannot exceed your empire's "Logistics" limit.
Attempting to combine fleets into a mega-fleet that would exceed your Logistics limit will fail, and those two fleets will remain separate fleets on the same tile.
To increase your empire's "Logistics" limit, research the Logistics row in the Engineering tech tree.