For this you need to follow the following steps.
1) Login To Admin
2) Navigate to System->Configuration.
3) change Current Configuration Scope to your website.
4) Navigate to Advanced->Developer which is available at the lower side of the page.
5) Under debug set Template Path Hints = yes and Add Block Names to Hints
= yes and refresh the page to which you want to debug you will get a path for the phtml file and block file.
6) to find a block for ex Mage_Page_Block_Switch you need to move for the location
app\code\core\Mage\Page\Block\Switch.php where Mage is the namespace / company name, Page is the module name and Switch is the block file name.
Hope this will help you.