In computer terminology, Hot-Swapping refers to being able to disconnect and remove hardware, as well as installing and connecting hardware, without turning off a computer.
Generally, this is a dumb idea, since most operating systems and most hardware aren’t prepared for you to do that.
In fact, a lot of internal hardware (drives and memory, for example) can fry if you connect them while your computer is powered. PS2 ports for keyboard and mouse are also subject to frying themselves — the motherboard connector, not the frying the cheap keyboard or mouse — if you unplug or plug a device into a PS2 port. Of course, new computers today seldomly have PS2 ports, but those from recent years have them.
Many new devices use USB connections to connect to the computer. Examples of devices using USB connectors today are keyboards, mice, scanners, flash drives, cameras, some network adapters, and even more items.
Although hot-swapping is billed as one of the big advantages of USB, the devices are not all "hot swappable."
In most cases, you can safely disconnect a storage device (flash drive, external hard drive, etc) if you use the “Safely Remove Hardware” icon in the Windows Status Bar.
Left-click on the Safely Remove Hardware icon. This will open a small option box that shows you which devices you can stop and remove. Flash adrives and external drives will always be listed here (if they are currently connected).
Once you click on the item to disconnect, such as "Safely remove USB Mass Storage Device – Drive (G:)" for my flash drive, you will get one of two responses. One response says something like "ok, you can disconnect it". The other response is "you can’t do that now, it’s busy." This usually means that you have a Windows Explorer window open and displaying that directory. If all else fails, close all Windows Explorer windows and try to Safely Remove it again. If that fails, reboot.
The problem is that Windows, in order to operate more quickly, doesn’t always make you wait for hard drive activity to finish — or even to take place. Windows will eliminate the hourglass cursor and then use its "delayed write" function to write the last of the data to the device when your computer is more idle.
If you Safely Remove, you’re telling Windows to write any remaining cached data to the drive. Similarly, if you reboot (via the Windows Shutdown/Reboot function, not by hitting the Reset button), that will trigger the writing of the last of the data.
If you disconnect your flash drive or external drive without using the Safely Remove function, you risk not only that particular bit of data, but also all the data that you’ve written to the device.
You can also confuse Windows XP (and earlier versions of Windows) by pulling out the connectors of other USB devices without shutting them down.
At that point, even if you plug the device back in, Windows XP may not recognize it as being connected. Most of the time, rebooting Windows and then plugging the device in again is all that is needed. Sometimes, though, you will have to go to Control Panel, System, Hardware, Device Manager and select the malfunctioning device (if Windows sees it but doesn’t know what to do with it, Windows will show a yellow exclamation mark beside the item). Right-click on the device and select Uninstall from the popup menu. Then, OK to close the System dialog box, and reboot. Windows should recognize the device and set up the driver properly as it reboots.
So, if you unplug a USB device without telling Windows to “Safely Remove Hardware,” or without waiting for it to complete its safe removal process, you’ll probably have to reboot to use the device again. If it’s a mass storage device, such as a flash drive or hard drive, you may have lost some or all of the data, too.
Finally, Windows simply will not let go of the device — if it says the device can not be stopped now — closing all the open applications and try again. If that doesn’t work, shutdown and reboot it. Windows will flush any cached data to the drive during the shutdown process.

