"format the hard disk" could mean various things. There are 2 basic operations to make a disk useable: partitioning, and installing a file system. In some contexts, both are combined.
You can create partitions and file system without ever affecting the MBR or other locations where bootloaders (eg GRUB) typically live.
When installing an OS, one typically also installs a bootloader. This will remove whatever was there previously.
Also what is the installation process for LINUX as I have Ubuntu CD with me?
Boot the computer from the CD and follow the instructions.