Immune: swarms, troops

A pinned creature is tightly bound and can take few actions. A pinned creature cannot move and is denied its Dexterity bonus. A pinned character also takes an additional –4 penalty to his Armor Class. A pinned creature is limited in the actions that it can take. A pinned creature can always attempt to free itself, usually through a combat maneuver check or Escape Artist check. A pinned creature can take verbal and mental actions, but cannot cast any spells that require a somatic or material component. A pinned character who attempts to cast a spell or use a spell-like ability must make a concentration check (DC 10 + grappler's CMB + spell level) or lose the spell. Pinned is a more severe version of grappled, and their effects do not stack.

Marius, Scholai Armsmaster Says: If a pinned creature succeeds on an opposed grapple or Escape Artist check, they break both the pin AND the grapple. If you have a creature pinned, you can tie them up.  If you use rope, the escape DC is 20 + your combat maneuver bonus.  If you use manacles, they have their own DC.