A good rule of thumb is that if you can't see the truck driver's face in the side mirrors, the truck driver can't see you. Trucks typically can't see anything less than 30 feet behind the trailer. Stay 100 to 250 feet back or follow the four-second rule. If you pass the same fixed point as a truck before reaching the count of four, you're following too closely. Never pass on the right.
Blind spots are even larger on that side.
Don't cut in front of trucks. Keep four to five car lengths between you and the truck. Loaded trucks can weigh 80,000 pounds and require the length of a football field to stop. If a truck is signaling to change lanes, give it room. The driver may be trying to avoid another vehicle.