At one point in the film Robbie sees the clown doll staring at him and, finding it creepy, covers the doll with his jacket. This foreshadows the events later in the film.
Later in the film when Robbie is about to go to bed he notices the clown is gone. He starts looking for it, looking under one side of the bed, only to see nothing. He checks the other side of the bed and sees nothing too, but when he gets up the clown doll is behind him, grabbing his face before dragging him under the bed.The clown continues to choke him until Robbie fights back, ripping the clown doll's stuffing out before bringing it on top of the bed and continuing to attack it before finally stopping.