What is meant by flux?

Flux is a substance added to the ore to remove the gangue from it by reacting with ore. If the impurity is acidic substance, basic substance is used as flux and vice-versa.