After battles experiance is gained by both the fleet and the individual ships within it, according to the different formulas for fleet and ship experiance.
Usually, it is best to set your stategies so that ships will break formation. Fleets tend to be stronger when the ships are not locked into rigid positions, as they do not have to waste time moving to the opposite side if the fleet leader turns around, which happens a lot.