Lets begin with the procedure. First of all we need to prepare the pen drive/USB stick. Ensure that your pen drive/USB stick is virus free and empty and has enough space to hold all the windows setup files that is on the windows CD/DVD. Plugin you pen drive/USB stick. Then open Command-Prompt(cmd.exe) with ADMIN rights.
Type in and do the following as directed to format hard drive with usb:
2. List Disk
3. Select Disk 1
5. Create Partition primary
6. Select partition 1
8. Format fs=NTFS
After you are done with this you just need to copy the windows setup files to the pen drive/USB stick. Now you have to enable USB booting in BIOS setup and also set pen drive/USB stick in the first preference on top to boot from. Just plugin and use you pen drive/USB stick to format hard drive of your computer same like a windows CD/DVD.