Mining is the process of spending computation power to secure transactions on Proof of Work networks against reversal and introducing new coins into to the system.
Technically speaking, mining is the calculation of a hash of the a block header, which includes among other things a reference to the previous block, a hash of a set of transactions and a nonce. If the hash value is found to be less than the current target (which is inversely proportional to the difficulty), a new block is formed and the miner gets the newly generated coins. If the hash is not less than the current target, a new nonce is tried, and a new hash is calculated. This is done millions of times per second by each miner.
Is Bitcoin Mining used for some useful computation?
The computations done when mining are internal to Bitcoin and not related to any other distributed computing projects. They serve the purpose of securing the Bitcoin network, which is useful and has value.