If a driver is tailgating your car, you should:
Change lanes to avoid them, if possible.
If you cannot change lanes, then brake slowly. This will encourage them to pass you and minimize your risk of a rear-end car accident.
If they do not pass, then pull off the road as soon as you can safely do so.
When you are safe, you may call the police and make a report about the driver if you believe they are endangering everyone on the road.