The dangers of hot swapping parts           
  Plus how to do this correctly.

Hot means power is stored or live power present.
The PC is chock-a-block full of large capacitors. (yes they store energy , lots)

Or AC power is live and connected to your PC.
or you have large batteries in your laptop or notebook that you did not remove first.

The external jacks on your PC can all  be hot swapped, at any time.
Plus Esata jacks of the PC supports it, the OS supports it and the device you plugging it supports hot swap (esata for sure can be hot swapped, if you line up your ducks)
My 3 Servers from Dell and HP all have hot swap SAS or SATA bays (designed just for hot swapping)
My Server have hot swap drives, fans and 2 PSU's  (yes, even PSU's)

The inside, of any standard ATX based,  PC , you must not ever hot swap these devices, and plugs. (jacks)
The huge 24 pin power connector
or any cable going to the PSU, inside the PC, all of these are RAW DC power rails and most not be connected hot ever.
Do not hot swap anything inside the PC. (is a best practices) or you will blow things up, and it can be very costly even $1000 damage. (gaming PCs are expensive)
Never hot swap PCI express slots,  (some PCs allow this, but never video cards, and only if the PC was sold with this feature, best is NEVER DO THIS)
Nor any 4 pin 6 pin or 8pin PSU pig tail cables. (ever)
Nor hot swap RAM.  (nor CPU, wow)
Nor hot swap SATA drive power cables, ever.

The correct action in all cases to prevent the above bad acts.
Is  to do this:
  1. Unplug the AC line cord (or line power pack) from the AC jack in the WALL. (in the USA this  is 120vac , 120 volts AC or alternating current,  as Mr. Telsa invented)
  2. If  laptop remove the huge battery first , some laptops have 2 batteries, or a 2nd where the DVD drive was. All big batteries out , but never the RTC coin Cell battery tiny.
  3. At this time huge capacitors store lots of dangerous (not to you) energy,  so we push the power button for 1 to 5 seconds, and you see fans spin for 1 second and you go, wow, this works.!
  4. Best is to wait 5 minutes just in case. Let the system bleed down to a  real 0 volt state.,  (longer is ok sure)
  5. Last is to  pull things or add things to your hearts content. (using a ESD wrist strap) or keep one hand touching grounded metal inside. (on laptops I use  a strap every time)\

Legacy devices long gone that hot swap ok. (or not)
PS2 keyboards and mice (do not do that as many PCs made had no power protection resistor here to make it safe) (one of the top reasons for using USB now as USB is hotswap by design)
RS232 Serial port, (safe even grounding its pins is safe (EIA/TIA rules)
PATA power (never) IDE HDD 2001 and older.
Floppy power , 4 pin never.
CD/ BR-d/DVD power , never.

version 1.  2-2-2019