Here it means 'really ,actually , in the sense of the word'.
When something sounds far-fetched to really occur, like kids on their hands and knees crawling over the guy and pulling his hair, the word 'literally' is used to assure it is really happening and it is not a metaphor of any kind,but a real actual action.