In simple terms:
The PGW in Switched or Call Control Mode performs the switching of calls handling all the call signalling. Media gateways are slaves of the PGW controlled by MGCP or H248
The PGW in Nailed or Signalling Control Mode protocol translates SS7 signalling to either Q931/IP or IUA to the Media Gateway. The Media Gateway has the switching intelligence via configured dial-peers.
Hope this helps.