Assuming that you know the device name of your hard disk and the partition name of the part that needs formatting. First step is to unmount that volume from it's mount directory (if it is mounted).
Then you can format your partition on the unmounted device (needs to be root for this)
Of course replace my samples with your device and mountpoint.
The formatting tool is actually mke2fs, but some distributions provide script or binaries for specific filesystem formatting. mkfs.ext3 is typical on Fedora. Read man mke2fs for details.
The above information actually only overwrites the filesystem. For full hard disk formatting and repartitionaing you need /sbin/fdisk (type m for help info).