A mutation is a change in the genomic sequence - this can either be in the DNA or for viruses also in the RNA which carries their genetic information. This can either happen due to external influences (chemicals, radiation) or internal (mistakes while copying the information) reasons. See the figure below which shows the principle:
DNA based lifeforms usually have pretty good proof reading functions which eliminate most mutations, as they are often causing problems. RNA based viruses (as the flu virus or the ebola virus) do not have a proof reading function which raises their mutation rate drastically. See the figure below, which shows the mutation rates of several organism groups (image from this paper):
These higher mutation rates indeed produce high number of mutated viruses which are different from the original form. This leads to a high number of viruses which are non-functional due to this mutations, but also to a few which are better adapted or look different due to this mutation. This can help in evading the immune system (when surface proteins of the virus change) or to adapt better to a host.
Since the number of viruses in an infected individual is very high (billions of viruses) it doesn't matter and the the mutations which are beneficial for the virus are positively selected for.
This can lead to difficulties in the production of vaccines when the proteins used in the vaccine mutate. Usually this is accounted for by using proteins for immunization which only mutate slowly or not (because their function is important and mutations disrupt it). For more information have a look at the following review: