The attacker will come from behind. Try your best not to panic.
Grab the attackers arms to gain control.
Drop your weight as low as you can to try and unbalance your attacker.
Lift your foot up- either side- and stomp on your attackers foot while staying low.
After stomping their foot, take a step forward away from the attacker. You may be able to escape at this point.
Take a step back and kick the attacker in the shin to put them off balance.
If you haven't been able to escape the attacker yet, you can head-butt them. They should be close enough still to make contact.
If you aren't comfortable with a head-butt or the attacker it too tall, you can also reach back and try to pull their ear or hit any part of the head.