There are many layers to any cryptocurrency blockchain, one of these layers (if supported*) and a very important one is mining using special software and expensive hardware.
*Some cryptocurrencies are pre-mined meaning that the whole available supply of coins has already been generated by the company or project before running the offering; no more coins can be mined with hardware but may be able to be staked with PoS (Proof of Stake). This is all hardcoded into the blockchain software.
Originally Bitcoin (BTC) and other early cryptocurrencies were mined using a CPU (Computer Processing Unit) with PoW (Proof of Work) but as the network difficulty grew (as more and more miners came online) then the need for GPU (Graphical Processing Unit) hardware was required, sometime later still and ASIC (Application-Specific Integrated Circuit) hardware was required – as the difficulty goes up so does the need for more and more hardware being operated and online – it is a constant race that is ever getting more difficult to ‘win’ and gain a block reward – this has just happened with the Bitcoin block reward halving – it’s exactly how it is named as the block rewards after a certain block height has passed, fewer rewards are possible to be sought.
In this sense, some cryptocurrencies are GPU/ASIC/FGPU resistant meaning instructions are hardcoded into the blockchain to prevent unfair advantages from some and only certain hardware is allowed to take part and compete for block rewards.
Every coin and blockchain is different, some start off with a PoW Proof of Work) stage which changes to PoS (Proof of Stake), others stick with PoW, some are purely PoS.
The big difference being using hardware (PoW) to solve blocks which then changes to staking (PoS) with a desktop or server wallet that is constantly online, the balance is preserved and untouched to facilitate the network.
Whether PoW or PoS, both can be considered mining with the latter being much more environmentally friendly due to far less electricity being used to perform the same task.
Different cryptocurrencies have varying algorithms for their use, Bitcoin uses SHA-256, DASH uses X11, Litecoin uses Scrypt and so on. It is only possible to mine a certain cryptocurrency if you have the right hardware.
With the special hardware required many miners around the world compete for block rewards, some prefer to mine in a pool whilst others (like me) go for solo block rewards, this means that the whole block reward is won and it is not split up between many miners in a pool, the reward is much greater but the chance of finding a block less so.
Each blockchain is different and has built-in tools to prevent a network takeover in the form of a “51% attack”, this means that if a supposed individual has a large amount of hashpower (mining power) which equates to 51% or more of the entire network hashrate, it would be possible for the individual to take over the blockchain, at least with the blocks and consensus – it would then be possible for the individual to fork the code (make a copy) then release a new wallet, one that would only work forward of the fork – others would need to use this specific wallet to carry on using the blockchain, there are also other security concerns and implications with this type of attack but security procedures are built in to prevent this and other forms of attack.
Read more about PoW
Read more about PoS