Dim your headlights for oncoming vehicles or when you are within 300 feet of a vehicle:

You are required to dim your headlights to low beams within 500 feet of a vehicle that is coming toward you and within 300 feet of a vehicle that you are following.
DMV Writen Test