Like any good object-oriented system, Magento implements an Event/Observer pattern for end users to hook into. 
As certain actions happen during a Page request (a Model is saved, a user logs in, etc.), Magento will issue an 
event signal.

When creating your own Modules, you can "listen" for these events. 
Say you wanted to get an email every time a certain customer logged into the store. 
You could listen for the "customer_login" event (setup in config.xml)


And then write some code that would run whenever a user logged in:

	class Packagename_Mymodule_Model_Observer {
	    public function iSpyWithMyLittleEye($observer)
		$data = $observer->getData();
		//code to check observer data for out user,
		//and take some action goes here