SAP started out as a software provider of ERP (Enterprise Resource Planning) software. This is software for supporting regular business end-to-end processes (purchase-to-pay, order-to-make, order-to-stock, etc. and other supporting processes, like financial accounting and HRM).
From that base, they have created many more tools that businesses can use... Business Information Warehouse (BW) for management reporting, Advanced Planning and Optimization (APO), and CRM, amongst others.
These days, SAP is moving towards being a platform, where you can plug in several solutions (that use the methodology of SAP for interacting between applications, called SAP Netweaver), and they all cooperate in a best-of-breed fashion to support business processes.
Now, back to CRM. CRM is a separate solution from the SAP R/3 Business suite mentioned above, and as such it can run separately on the SAP platform. Although it is more likely to be implemented in a business that is already using other SAP solutions. If you want to know more, check what I've written about SAP CRM on my site.
Hope this helps.