BADI Implementation and BAPI creation

Hi,

Am relatively new to SAP CRM. I would like to know how to do BADI implementation, BAPI creation ...how it works ...I would like to know in detail regarding this. Can anyone help me with documents/pdf/links?