umount call. In C it's like this:
#include <sys/mount.h>
int umount(const char *target);
(this is from the umount(2) manpage)
Unfortunately, I've never did it from Pascal, so I cannot help you much. You could check the FPC documentation, also someone with some experience in this might help better...
You should also beware it is quite likely for the unmounting to fail, either if the volume requires root privileges to unmount, or there are open files on it (quite often). There isn't much you can do about it from your program if it happens, but handle the error gracefully and report it to the user...