I means about grub2, not grub.
sudo vi /etc/default/grub
in that file /etc/default/grub, you can found
GRUB_TIMEOUT=10
change this to the seconds you want
GRUB_TIMEOUT=3
and then execute
sudo update-grub
to test this, you can find the file in /boot/grub/grub.cfg has been changed,
from
set_timeout=10
to
set_timeout=3