Traffic Light Syncronism

Long post, all based around how Traffic lights are timed.
For me, in GA. USA it seems that traffic lights are for the most part, an all green or all red affair. There are times when you sneak out and get on the opposite cycle as it where, or perhaps you are in a new system. What determines when the lights switch? Is there any sensor or weight plate (I doubt) that triggers the change? (Other than the Walk/Dont Walk button)
Is it all set up with an algorithim in those control boxes seen next to most intersections? If human input alone determines the times and rates of change, how is this rate calculated, and reviewed?
There is one horrible intersection that I know of where the actual intersection (not the striped lanes) is blocked by intersecting traffic almost every time.