When they are in a stack together, you need to click one ship (in the panel at the bottom of the screen) then another ship - this will clearly highlight them in blue on that panel. Pressing create fleet will then put both of those ships into a fleet.
You can also set a rally point (look at the top of the action panel on the far left above your cash and population numbers) to create fleets. Then point your production planets to that rally point - on the main view left click a planet, see the little picture of it at the bottom left of the screen with a yellow downwards pointing arrow - click that and select the rally point you made. Ships produced will automatically go to the rally point and form fleets.