Green and black olives grow on the same tree. Green olives are harvested early, while they are still unripe. Left on the tree, they turn from violet to black. As they ripen they become softer, milder and richer in oil.
A word of caution with table olives: some black olives were actually harvested green and coloured with oxygen and iron salts. The label then says something like “blackened” or ferrous gluconate (E 579). For olive oil, the time of harvest is what matters most.