The most relevant parts for you in this case are:
- Template file (.phtml) and
While the template files include the basic HTML output, which is a combination of PHP and HTML (thus .phtml), the blocks are interacting with the Magento system to retrieve data from models.
Example: The file which creates the HTML output for the product pages is
app/design/frontend/rwd/default/template/catalog/product/view.phtml which belongs to the Block
Mage_Catalog_Block_Product_View (can be found in
The .phtml files will mostly call functions from the Block, such as in
<?php $_product = $this->getProduct(); ?> refers to the
function getProduct() of
Whatever you do: Do not edit these core files. Familiarize yourself with best practise methods of how to work with Magento.
A good starting point for this is Alan Storms Blog: http://alanstorm.com/category/magento#magento_for_php_developers