Improved Grab (Ex): If a creature with this special attack hits with a melee weapon (usually a claw or bite attack), it deals normal damage and attempts to start a grapple as a free action without provoking an attack of opportunity. No initial touch attack is required. Unless otherwise noted, improved grab works only against opponents at least one size category smaller than the creature. The creature has the option to conduct the grapple normally, or simply use the part of its body it used in the improved grab to hold the opponent. If it chooses to do the latter, it takes a –20 penalty on grapple checks, but is not considered grappled itself; the creature does not lose its Dexterity bonus to AC, still threatens an area, and can use its remaining attacks against other opponents. A successful hold does not deal any extra damage unless the creature also has the constrict special attack. If the creature does not constrict, each successful grapple check it makes during successive rounds automatically deals the damage indicated for the attack that established the hold. Otherwise, it deals constriction damage as well (the amount is given in the creature’s descriptive text). When a creature gets a hold after an improved grab attack, it pulls the opponent into its space. This act does not provoke attacks of opportunity. It can even move (possibly carrying away the opponent), provided it can drag the opponent’s weight.
Constrict (Ex): A creature with this special attack can crush an opponent, dealing bludgeoning damage, after making a successful grapple check. The amount of damage is given in the creature’s entry. If the creature also has the improved grab ability it deals constriction damage in addition to damage dealt by the weapon used to grab.
So: the scorpion attacks with a claw: +6 melee (1d6+4). If successful, it deals its claw damage. Due to Improved Grab, it then gets to make a grapple check to establish a hold and draw the target into its space. This would normally deal no damage, but because the scorpion has Constrict, establishing the hold deals another 1d6+4.
That's the end of that round.
In the next round, the scorpion can make a grapple check to damage the opponent (+11). If successful, Improved Grab means he deals claw damage (1d6+4), and Constrict means he deals his Constrict damage in addition (another 1d6+4).
-Hyp.