This behaviour is, sadly, one that is observed on a regular basis when people drive too close behind you and compromise not only their safety but yours aswell.
There are a number of things that you can do in this situation but at a high level the options really boil down to two actions. Firstly in my opinion is to let them get past you at the earliest opportunity. On a duel carriage way and a motorway moving to an inside lane, lane 1 on a dual carriage way or lanes 1 or 2 on a motorway will often solve the problem. Once they are in front of you you have complete control of the distance to the car in front.
If you can't move over then the second option is to slow down to lessen the impact of any collision but also provide information using you brake lights, indicators and position in the road, to make clear your intentions.
Whatever you do DO NOT brakecheck a tailgater but applying your brakes in a sudden or aggresive manner. This may likely result in a collison.
![](https://i.ytimg.com/vi/m0ZYhs63lTo/maxresdefault.jpg)