In the simplest method, open a terminal and do this:
(and in the grub shell)
Copy/paste the result into your config file. E.G.:
sudo nano /boot/grub/menu.lst
password --md5 $1$NVuTR/$P.zv1q7Mu.W2TEO7ulll70
(press) ctrl o
(press) ctrl x
Now when you reboot you will have to press "p" and enter your chosen password before you are allowed to access GRUB's features outside of booting the existing choices.