You can maintain up to 2 locks. Each lock must be on a different object.
After a friendly ship at range 0-3 is locked, you may acquire a lock on an enemy ship.