Generally speaking, overdrive (O/D) is the highest gear in the transmission. On most cars the automatic transmission has 3 speeds and Overdrive (forth speed). Overdrive allows the engine to have less rpm with higher speed in order to have better fuel efficiency. When you switch it on, you allow the transmission to shift into overdrive mode after the certain speed is reached (usually 30 - 40 mph depending on the load). When it's off, you limit transmission shifting by third speed.
In normal driving condition the overdrive should be always on.
You may need to switch it off if you drive in mountains area.
The automatic transmission automatically shifts from OD to the 3-th gear when it feels more load. When it feels less load it shifts back to the O/D, but under certain conditions, e.g: driving uphill or towing a trailer, the transmission can not decide to stay in OD or to shift into 3-th speed and it starts to shift back and forth. That's the time you may switch it off and help the transmission to decide.
You also may need to switch it off when you want to slowdown using the engine braking, for example, driving downhill. [For more details, check your owner's manual]