Most touchpads allow this setting, it can be found in Mouse Properties. This example is for Synaptics touchpads:
Open Control Panel > All Control Panel Items > Mouse
Select the Device Settings tab
Select Disable internal pointing device when external USB pointing device is attached
Click OK to save settings
That's it. Now every time you connect a USB mouse, the touchpad is automatically disabled. As soon as USB mouse is disabled or disconnected, the touchpad will be enabled again. Depending on Notification Area settings you'll get a notification (screenshot above, at bottom) every time touchpad is disabled or enabled.