SSID is the user friendly way to recognize a wireless network. SSID identify the Extended Service Set; which is the entire network, wether it is one or serveral APs.
BSSID is a 48-bit identifyer used in the network packets send to direct it to the AP the station is connected to. Created of the MAC address of the AP, and is used to identify the AP
in ad-hoc networks - the BSSID is random number (there are no AP in Ad-hoc networks, or IBSS)