An objective function is a mathematical formulation that uses variables to describe which goal is to be achieved in an optimisation. An objective function is then to be minimised or maximised.
In many cases, one-dimensional objective functions are formulated, defined for example in terms of costs, revenues, sales or utilisation. In route planning, an objective function may, for example, require minimising the distance travelled, the sum of driving times, the maximum driving time or the number of vehicles used. Some of these are competing goals: minimising the distance travelled often competes with the goal of minimising the number of vehicles used. Similarly, in problems with time windows, for example, the shortest distance is not achieved if you want to minimise route duration (instead of waiting, you might accept detours to save time).
If several goals are pursued simultaneously, this is referred to as multi-criteria optimisation. An example of this is wanting all sales staff to work roughly the same amount of time while also having roughly the same sales potential per employee.