It's true, but it's kind of like saying “what happens when you meet someone for the first time? Light reflects from their body onto your retina.” It's too low level to see the interesting parts.
So yes, assuming that the hardware is connected to a controller that detects external connections (e.g. an USB/Firewire/eSATA/… controller, or a graphics processor with VGA-with-EDID/DVI/HDMI/DisplayPort), the controller will send a signal on a bus and that signal will trigger an interrupt on the CPU. The interrupt handler in the kernel, which is part of the driver for that controller, will go and read a message from the controller. That message will contain information about the new device, formatted according to the protocol used by that particular controller.
If the device is of a kind that requires a specific driver in addition to the driver for the controller, then there's a mechanism for automatically loading a module containing the proper driver. See
Are driver modules loaded and unloaded automatically?
Note that it isn't a given that the hardware is detected. That depends on the electronic design. On some older types of connections (serial ports, VGA with old monitors, many sound jacks), there's no mechanism to report whether a device is plugged in or not.