Class B airspace is the most complex type of controlled airspace.  The purpose of Class B airspace to create a safe area for busy airports, that is free of most VFR general aviation traffic.

a. Definition.
Generally, that airspace from the surface to 10,000 feet MSL surrounding the nation’s busiest airports in terms of IFR operations or passenger enplanements. The configuration of each Class B airspace area is individually tailored and consists of a surface area and two or more layers (some Class B airspace areas resemble upside-down wedding cakes), and is designed to contain all published instrument procedures once an aircraft enters the airspace. An ATC clearance is required for all aircraft to operate in the area, and all aircraft that are so cleared receive separation services within the airspace. The cloud clearance requirement for VFR operations is “clear of clouds.”

Each Class B airspace area is custom tailored to the primary Class B airport.  All instrument approaches to the primary airport must be protected by the airspace.  The airspace must also be created in such a way that nearby airports are not adversely affected by Class B Airspace requirements.  Since most Class B airports are in busy urban areas with large amounts of traffic, VFR corridors must also be created to allow VFR traffic to operate in the vicinity of the Class B Airspace.
All of these considerations mean that Class B airspace not only has a complex shape, but is very busy for air traffic controllers.  Approach controllers have usually created a very specific traffic flow for IFR traffic at most Class B airports.  Even the smallest change can disrupt operations.  Whether you are flying VFR or IFR expect complex vectors, busy radios, and controllers that expect you to know where to go and what to do when told.
To operate in Class B airspace, the pilot must hold at least a private pilot certificate, or be a student pilot with an endorsement by their flight instructor to enter that specific Class B airspace.  The following airports do not allow any student pilot operations:

2. No person may take off or land a civil aircraft at the following primary airports within Class B airspace unless the pilot−in−command holds at least a private pilot certificate:
(a) Andrews Air Force Base, MD
(b) Atlanta Hartsfield Airport, GA
(c) Boston Logan Airport, MA
(d) Chicago O’Hare Intl. Airport, IL
(e) Dallas/Fort Worth Intl. Airport, TX
(f) Los Angeles Intl. Airport, CA
(g) Miami Intl. Airport, FL
(h) Newark Intl. Airport, NJ
(i) New York Kennedy Airport, NY
(j) New York La Guardia Airport, NY
(k) Ronald Reagan Washington National Airport, DC
(l) San Francisco Intl. Airport, CA

A VFR pilot must get a clearance before entering Class B airspace.  Most of the time the clearance will sound like “Cessna XXX is cleared into the ____ Class B Airspace.”  Sometimes, but not often, a controller will not specifically give a clearance into the airspace but will give a vector or other directions that will place the aircraft into Class B Airspace.  While this is acceptable as a clearance, it is good practice to double check and make sure that you hear the clearance into Class B airspace.
Aircraft operating on an IFR flight plan do not need clearance to enter Class B airspace since the routing is already known and the aircraft is already being handled by air traffic control.
Two-way radio communication must be maintained while in Class B airspace and a Mode C transponder is required within 30 NM of the primary airport in Class B Airspace (Mode C veil).  An aircraft may operated without a Mode C transponder as long as prior approval has been given by the approach facility.  If the flight is operating under IFR, an operable VOR received must also be installed on the aircraft.
Large turbine powered aircraft that are landing to the primary Class B airport must operate within the boundaries of Class B airspace at all times.  A clearance for a visual approach does not allow the pilot of large aircraft to operate below the floor of Class B airspace.
While it is perfectly acceptable for a VFR aircraft to fly in Class B Airspace, the FAA prefers VFR aircraft to stay clear of Class B airspace.  To help VFR aircraft transition Class B airspace without having to enter the airspace and receive a clearance, VFR flyways and VFR corridors have been created.  These routes can be found on Terminal Area Charts for each Class B Airspace area.  The general frequency is 122.75 for all aircraft operating within Class B VFR Corridors.
Class B is probably some of the safest airspace to operate in and yet also the most stressful for new pilots.