Create a file ~/.config/pcmanfm/LXDE-pi/pcmanfm.conf for the "default" user (the one created when installed) with the following contents.
[volume]
mount_on_startup=0
mount_removable=0
autorun=1
After a reboot USB disks/etc. will not be automatically mounted anymore.