With a brief search, I found some tutorials on the net.
Brief explanation:
You hold all snake units in a list.
There are head and tail, which are the first and last elements of the list. So it's really a queue.
At every turn, determine the direction in which you should move. For example, if the direction is left, then the coordinates of the next head will be at (-1.0) relative to the current head. Insert new unit in the list in the head position with the coordinates determined previously.
Remove the tail unit from the list (on the screen). It will organize the movement. If you find a little food in the head position, start a growth counter. At every instant, counter-growth > 0, decrease it and ignore the tail unit removal. Thus, only the head will move until it grows.
references:
link
link
link