To get child product in cart for a configurable product. You can visit Block Mage_Checkout_Block_Cart_Item_Renderer_Configurable
, it has a method getChildProduct
which returns object of associated child product of the Configurable product you have added in cart.
For Example to print child product's ID in cart you can write such code somewhere under <dl class="item-options">
in file {theme}/template/checkout/checkout/cart/item/default.phtml
<?php
$child = $this->getChildProduct();
echo $child->getId();
?>