The best way to do that is to hire a lawyer and then have them find and hire a private investigator for you. You can also hire a private investigator yourself without the lawyer, but if the lawyer hires them and then you have to sue someone later you don't have to necessarily divulge everything the private investigator tells you whereas if you hire them yourself then you would.
You really won't know what to do after that until you find out who is following you. The PI will be able to run the license plate numbers to find out who the cars are registered to and then they can follow them while those people are following you, if it is necessary.
Once you find out who they are you may have to file for an injunction to stop them from following you or there may be something else you can do although an injunction is most likely.
The steps to an injunction are:
1) An Application for TRO (Temporary Restraining Order) is filed along with supporting evidence such as affidavits. Usually the Application for Injunction is made at the same time. The TRO is a temporary measure and is not absolutely required before you get an injunction.
2) An Ex Parte (without the other side present) Hearing is conducted and the judge either issues the TRO or denies it. If the TRO is issued the judge orders a bond set in a sufficient amount to compensate the other side for any damages accumulated while the TRO is in place if the applicant fails to prove their right to an injunction.
3) A hearing on the TRO is set.
4) The TRO and notice of Hearing is served on the defendant.
5) The defendant should immediately begin following the judge's orders.
6) The TRO hearing is held and each side has an opportunity to present evidence and question witnesses.
7) The judge makes the decision on whether to convert the TRO to a Temporary Injunction or not.
8) If the TRO is converted to a Temporary Injunction then the judge sets a new bond to be in place.
9) Discovery is conducted by both sides.
10) A request for hearing date is made on the matter of converting the Temporary Injunction into a Permanent Injunction.
11) The hearing/trial is held on the Permanent Injunction and the judge issues a ruling.
These are what are known as extraordinary remedies and the procedural rules for these as well as the case law are EXTREMELY specific and difficult. If ANY mistakes are made the judge has no choice but to deny the relief and will not likely reconsider it in the future.
Just as an example, getting injunctive relief, both temporary and permanent, requires that evidence be offered of:
1) An immediate need,
2) Which, if not granted, will result in irreparable harm,
3) With no adequate remedy at law, and
4) (on temporary order) The person requesting the injunction is likely to succeed at a full trial on the merits.
If evidence is not offered to meet these four requirements, in a manner that the judge knows this is what the evidence shows, then the petition will be denied.
There are more requirements than this depending on the exact facts of the case but it is very, very easy to mess up one of these and end up having to pay damages to the other side just because your paperwork wasn't done properly.