Oracles are programs or pieces of code whose responsibility is to collect, process and send outside information to smart contracts on the blockchain.
Smart contracts are reliant on data to perform their functions and any data that is not on the blockchain has to be imported or passed thru an oracle and then fed to the smart contract itself.
Oracles have to be very robust and the data that they feed to the smart contract should incorporate error correction to weed out unreliable data or data sources. To that end considerable research is being undertaken to provide a decentralized oracle system to prevent a single point of failure where corrupt data either from a malfunctioning sensor or oracle feeds wrong data to a smart contract.
A theoretical example of an oracle interacting with a smart contract is a a system setup so that airline tickets are automatically cancelled and refunded if an airport is snowed in.
In this example the provider of data are a group of sensors that senses the weather conditions on an airport and these sensors are hooked up to the internet which sends data to an oracle. The oracle then processes data and then sends data to a smart contract on the blockchain which determines if flights are cancelled or not and if the weather is bad, automatically refunds tickets if flights are cancelled.