TL;DR: Logistics Ships, Marauders and Combat Recon Ships can lock the most targets.
The absolute max number of targets you can have locked is 12.
Your current amount of max locked targets is determined by two factors:
- The level of your Targeting and Multitasking skills
- The absolute max locked target limit on the ship itself
The base amount all players start with, is 2 targets. Each level of Targeting and Multitasking increases this by one (2+5+5=12).
The Logistics Ships, Marauders and Combat Recon Ships are the only ships in EVE that can lock 10 targets, and no other ship can lock more targets than these ships. The only way to hit 12 locked targets is by fitting an Auto Targeting System, as this module increases max locked targets by 2.
Even though an Auto Targeting System II gives a +3 bonus to max locked targets, you can never lock more than the max 12 targets determined by your skills.