Assuming you were using GRUB 2 as bootloader:
1. Boot to the LiveCD Desktop (Ubuntu 9.10 or later).
2. Open a terminal.
Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".
sudo fdisk -l
If the user isn't sure of the partition, look for one of the appropriate size or formatting.
Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently.
4. Mount the partition containing the Ubuntu installation.
sudo mount /dev/sdXY /mnt
Example: sudo mount /dev/sda1 /mnt
Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot
5. Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.
sudo grub-install --root-directory=/mnt/ /dev/sdX
Example: sudo grub-install --root-directory=/mnt/ /dev/sda
If you installed via wubi and you did a clean install of windows 8 you will have to reinstall via wubi. Personally I don't recommend wubi because it is not meant to be used as a permanent installation, but rather as a temporary test drive. Unfortunately most users I have encountered that use wubi totally ignore this fact and as wubi almost invariably does, it gets messed up - then they want miracles performed to fix their wubi installation. If you like ubuntu do an installation to a partition.