Arrow keys / WASD to move, or use the on-screen pad on mobile.
Eat the food, grow longer, don't hit yourself or the wall.