What do I request when contacting tower of an airspace I'm transiting over?
This will vary for every airspace so lets go over them in descending order.
Class B (Bravo): First off, keep in mind for your future solos that as a student pilot you are not allowed to fly solo in class B airspace unless your instructor has given you training and a logbook endorsement for that specific class B (see 14 CFR 61.95). But if your instructor is in the plane then technically they are accepting the clearance, not you. For Bravo airspace a clearance is explicitly required and a typical exchange will go something like this:

PIC: &quot;1234XY 5 miles south west of KPHL at 4000 heading to KPNE requesting transition through the airspace.&quot;
ATC: &quot;1234XY squak 3425 and ident, altimeter 29.92&quot;
PIC: &quot;1234xy 3425 29.92&quot;
ATC: &quot;Ident received, you are cleared through to KPNE on your current heading at 4000&quot;

En route you may get traffic advisories or other instructions while in the space so you need to stay on the frequency.
Class C (Charlie): For Charlie airspace you only need to establish 2-way radio communication. A response containing your call sign will allow you into the space. Lets look at an example

PIC: &quot;Allentown approach 1234XY 20 miles to the southeast of Queen City at 3000 in bound for landing at Queen City&quot;
ATC: &quot;1234XY standby&quot;

Anytime you hear your call sign, it is considered to be the establishment of 2-way radio communication, if you hear &quot;aircraft calling Allentown, standby&quot;, you have not established 2-way communication and must remain out of the space since they did not respond with your call sign. Likewise you may be explicitly instructed that you must remain out of the space.
Class D (Delta): Delta airspace typically  extends up to 2500AGL, and you can often climb over it flying VFR. You do not need to hail the tower when doing so but many people do so out of courtesy. If you intend to enter Class D, follow the same procedure as Class C.
You can find the whole breakdown here
Flight Following: Where available and workload permitting you may be able to pick up flight following while in route. You can also coordinate a hand off from them to the airspace you are entering.