a.) SPSite - i.)It is a site collection and an be represented as SPSite class in the object model. ii.)SPSite object is a primary entry points to the server object model. iii.)It is used frequently in SharePoint application development. b.) SPWeb - i.) It is a specific site under site collection in Sharepoint. ii.) It is represented as SPWeb class in the server object model.
Both are classes of SharePoint Server side object model. Under SharePoint web application, you can have multiple site collections and under a site collection you can have multiple sites/subsites. To access/update site collection properties, object of SPSite class is used. And to access/update root site of site collction or sub site properties, object of SPWeb class is used.