addAttributeToFilter is a function that can be called on a product collection in Magento. In short, it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database.
$_products = Mage::getModel(‘catalog/product’)->getCollection()
->addAttributeToSelect(array(‘name’, ‘product_url’, ‘small_image’))
->addAttributeToFilter(‘sku’, array(‘like’ => ‘UX%’))
The above code would get a product collection, with each product having it’s name, url, price and small image loaded in it’s data array. The product collection would be filtered and contain only products that have an SKU starting with UX.