Blockchains do not have direct access to the data from the outside world. Blockchains, for example, cannot retrieve the information such as currency exchange rates, weather forecasts or stock market prices directly from the internet. Oracles are here to help as the interfaces that connect a blockchain with the external world.
An oracle is an agent, that sends data from the outside world to the blockchain (inbound oracle), or from the blockchain to the outside world (outbound oracle).
Oracles can be used inside of smart contracts.