You need to put workers at both simultaneously (one filling the Oil Derrick, the other manning the other building) in order to produce anything. If you did things correctly, there will be an income shown on the building card.
That is a weird mechanic. Wouldn't it be better to have oil as a resource? When the bar on Oil Derrick fills you get 1 oil as a resource (shown in the resource bar at the top). Then it gets used by the refinery and powerplant.