The anti-submarine missiles currently in service are best described as rocket propelled torpedoes.

They are fired into the area where the submarine is, the torpedo detaches from the setup and chases the submarine the way normal torpedo does.

The idea is that at one point the capability emerged to detect submarines at a particularly long distance and the regular torpedoes were of little use due to their short range and higher speed of the submarines.
Originally, the thermonuclear depth charges were used for the assured kill, but then the small caliber passive acoustic torpedoes appeared, capable to chase the quietest of submarines on the depths to 800 meters and they were adopted instead.
