Snakes are "milked" by expressing the teeth against a rubberised (or flat) surface and then massaging the venom glands in order to collect the snake's venom. In the real world, this would then be used to produce anti-venom. In the wizarding world, Voldemort uses Nagini's venom to create his rudimentary body potion

Later we learn the use to which the venom was put;
Wormtail was able to follow the instructions I gave him, which would
return me to a rudimentary, weak body of my own, a body I would be
able to inhabit while awaiting the essential ingredients for true
rebirth … a spell or two of my own invention … a little help from my
dear Nagini’ – Voldemort’s red eyes fell upon the continually circling
snake – ‘a potion concocted from unicorn blood, and the snake venom
Nagini provided … I was soon returned to an almost human form, and
strong enough to travel. Harry Potter and the Goblet of Fire