I think you are mixing up two completely different things. For the SD card, your board usually has a SD card reader, which is detected automatically by the USB bus host. Now, whether the SD card reader itself can notify the system of card insertion and extraction is a whole another matter.
If the reader can notify the system of these events, then you'll need to figure out what device management method (hotplug, udev, or something else?) you are using. Once you've figured that out, you'll need to find the correct script, rule or configuration file that is either called during the SD card insertion/extraction, or which can manage the commands that are executed when either of these events occur.
After finding these out, your last step is to just add the "block mount" and "block umount" commands to the queue of commands that are executed for the related events.