Yeah usually all your ships if they are in a fleet will target the same target.
To clarify a little, ships of the same type will attack the same target.
For example, all your light frigates will usually go for enemy carriers first, while all your long range frigates will tear the enemy's light frigates a new one.
Basically ships pick their auto-attack target by their attack type and the enemy's armor type, whichever armor type they get the most bonus damage against is what they auto-attack as a priority.
The table for the damage bonuses/penalties against various armor types is in gameplay.constants in GameInfo so you can peek at it with notepad. You'd have to look at each ship entity file to see what damage they do, but then it's also displayed in-game on their info cards what they're good against so you should get a good idea without having to dig in the files too much. 