First of all, make sure you have the latest version of your tablet driver installed.
If you're using a Wacom tablet, sometimes it's necessary to reset your tablet preferences to get it to work - eg. after you switched between different tablets on the same computer.
Here's how to reset your preferences:
For Intuos or Cintiq series tablets (as well as Graphire and Graphire 2):
Go to Start > All Programs > Wacom Tablet > Wacom Tablet Preference File Utility. Then select either “Remove My Preferences” or “Remove all Preferences”
For all Graphire 3, Graphire 4 and Bamboo series tablets:
Go to Start > All Programs > Pen Tablet > Pen Tablet Preference File Utility. Then select either “Remove My Preferences” or “Remove all Preferences”