What law in the U.S. governs when you need to pull over for a traffic
stop?
Specifically, Massachusetts?
Refusal to submit to a police officer, Mass. Gen. Laws Ann. ch. 90, § 25 (2016) governs. The relevant part reads:
Any person who, while operating or in charge of a motor vehicle . . .
who shall refuse or neglect to stop when signalled to stop by any
police officer who is in uniform or who displays his badge
conspicuously on the outside of his outer coat or garment . . . shall
be punished by a fine of one hundred dollars.
What about a police standing on the side of the road, waving you over?
(perhaps at a speed trap)
If the police officer is on a uniform and displays his badge, probably.
What about a police just standing on the side of the road, looking at
you?
Assuming the police officer doesn't "signal" you to stop, you would be okay under this statute. Whether he is legally justified in asking you to stop is a separate issue outside the scope of you question.
Bottom Line: Someone who doesn't want to run afoul of this law should stop whenever they think a police officer is pulling them over.