SharePoint by default logs all the errors into ULS logs typically stored in text files located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Logs.
Tools suggested by James are used to view the logs and most tools allows you to monitor the logs live or archived logs. Most tools would also allow you to filter. For example, you may filter on Level=Information to view verbose logs and level=high for error information.
If you are developing custom solutions on top of SharePoint, it will be your responsibiliy to log messages (with appropriate severity) in this log. I would suggest using a loggin framework that ships with SharePoint guidance: The SharePoint Logger