Whether planted in the ground or in pots, olive trees need precise amounts of water only at specific times of the year to make up for a lack of natural rainfall. Irrigation must be carefully rationed and controlled because olives are sensitive to excess moisture. Using a system with pressure regulators and a set of emitters that are adjustable within a certain range (of flow) is the best way to ensure a constant flow rate and no over-irrigation.
During the first stage of fruit growth (cell division and enlargement) the tree needs a lot of water to feed its fruits. This is followed by the second stage (pit hardening) and finally the third stage (oil accumulation). The optimum time for irrigation is therefore at the end of the growing season when the water requirement is lower than in the middle of the season.
If you're growing an olive tree indoors, it's best to use a light potting soil such as cactus mix with perlite or orchid bark. This is lighter than traditional indoor potting soil and will allow for more airflow in the roots. You'll also need to make sure that your plant gets plenty of bright, direct sunlight - a common problem that can cause wilting indoors is low light levels.
Unlike most fruit trees, olives don't require soil that retains a large amount of moisture - sand, for instance, holds no water and drains quickly, allowing the tree to absorb the water it requires at just the right moment. If you have clay-based soil, you may need to add a bit of horticultural grit to aid drainage and prevent the roots from becoming waterlogged.