I made my 8gb pen drive bootable to install Fedora.But after that when i plugged it back to my windows pc, its showing only 514 kb. What happened to the remaining size? I tried formatting the pen drive, it still remains the same.
When you tried to install Fedora, it created multiple partitions on your flash drive. The 512Kb partition you are seeing is most likely the boot partition. The other data is not lost, but Windows has trouble seeing it because it is not one of the formats that Windows recognizes (ext3, ext4).
Right clicking on the flash drive and selecting "Format" will only format the first partition. To get the rest of the data back you will need to open "Computer Management" and select "Disk Management". From there you will be able to format all partitions and gain back your "lost" space.
Below is a great step-by-step tutorial to show you how to format a drive with multiple partitions.