There are several different submission holds used in martial arts and combative sports that attack the ankle and can be called ankle locks. The most common and popular locks are the achilles lock, the toe hold, and the heel hook.
The first ankle lock a beginner in sambo, submission wrestling, or Brazilian jujutsu is likely to learn is the achilles lock, a very simple but versatile lock. It is obtainable from a number of different starting positions into a several different ending variations and positions. The weakness of the achilles lock is that, due to its simplicity and exposure, it is difficult to catch an experienced fighter, unless you are exceptionally fast, strong, or have a particularly inventive setup and execution.
The toe hold (aka foot lock) is also a relatively simple but effective ankle lock. Like the achilles lock, the toe hold can be obtained from a number of different positions and can end in several variations. Unlike the achilles lock, the toe hold is a twisting lock and thus is harder to control in terms of pressure and pain, depending on the flexibility of the lockee - it is easier to hurt your partner/opponent with the toe hold than the achilles lock. Still, it is a relatively safe leg lock and people walk away from tapping out to one every day without any ill effects.
Note: A variation of the toehold is what Ken Shamrock brought into the WWF/WWE pro-wrestling scene and is what Kurt Angle uses as his finisher. The variation that is used in pro-wrestling is unrealistic in its execution, but rest assured, in real life, a fully stretched out toehold will break your ankle and tear a few tendons in the process.
The heel hook is superficially an ankle lock, as the the part of the leg that is hooked and twisted is the heel. Under the surface, the heel hook is effectively an attack on the knee. The ligaments in the knee, particularly the anterior cruciate ligament will tear long before damage is taken to the ankle. This lock is notoriously difficult to control and has been banned in most competitions, including sambo, Brazilian jujutsu, Pancrase, and most forms of submission wrestling due to the number of permanent and debilitating injuries it caused.
There are several more different types of ankle locks but most are variations or combinations of these three basic ankle attacks.
Note: Prior to World War II, ankle locks were known to and practiced by Judo practioners but due to safety reasons, were removed from the curriculum and eventually forgotten by most of the Judo community.