In the hells one soul is worth one soul coin that can be traded for magic items or used to fuel an infernal machine (think of the art cars from Mad Max: Fury Road). Souls that are released from the soul coins or burned in infernal machines go on to become the lowest level of devil and are used as cannon fodder in the blood war. All devils can move up in rank if they acquire enough soul coins -- the number is unspecified. You start out as the lowest level and if you are cunning enough you can become an imp. Arch devils have a soul quota to meet to remain the ruler of their realms -- the details are worked out with Asmodus and are unique to each of the hells. Some very powerful demihumans can sell their souls and start out a higher rank of devil -- this can either be in their lifetime or as an option for the false (those who betrayed their gods or refused to worship a god)
The Abyss works similarly -- damned souls become manes and if they somehow managed to acquire souls they could become quasits and start moving up by becoming familiars. How the soul is used by the quasit is still not specified in 5th ed. In 1st ed, the mage who took a quasit as a familiar would be in for a nasty surprise when the mage died and the familiar grabbed the wizard's soul and used it to transform into another type of demon -- which prevented quasit-bound wizards from being raised from the dead.