what is bitcoin mining actually doing ?

Mining is a process to determine the canonical order in which transactions happen. It is also a way to introduce money into the system since without central issuer who would be in charge of issuing money and how would they do it fairly?
In other words miners build block chains , they get a reward for each new valid block they create.
.