Magento objects are instantiated using the factory methods-

Mage::getModel()
Mage::getBlock()
Mage::helper()

When Magento instantiates these objects it uses the getGroupedClassName() method in Mage_Core_Model_Config to find the correct class. It is in this methods that Magento searches for any class rewrites which have been defined in the configuration.

getGroupedClassName()
getGroupedClassName()