Magento - How to get children products associated to a configurable product

/*
* If you already have product's model object'
*/
$associatedProducts = $_product->getTypeInstance()->getUsedProducts();

/*
* If you have id of the product'
*/
$_product = Mage::getModel('catalog/product')->load(YOUR_PRODUCT_ID);
$associatedProducts = $_product->getTypeInstance()->getUsedProducts();

/*
* creating product type model object
*/
$associatedProducts = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null,$_product);