To stroke your ninja's head, first place you finger on the ninja's head, then rub it, making sure you don't take your finger off from the screen. You'll know you've done this right because the Ninja will rub back against your finger.