When Bitcoin users declared their signed bitcoin transactions on the bitcoin network then these transactions will be added to the pool of unconfirmed transactions.
Now miners select the transactions from this pool to verify these unconfirmed transactions which are contained into a block of transactions together.
Miners need to find the solution of the very difficult mathematical problem which required high computational power (known as a hash rate) in order to add this block of transactions into the blockchain.
For miners having more computational power have a higher chance of finding the solution of the problem before other miners find theirs in order to add the new block into the Blockchain.
After finding the solution, miner broadcast the new block of transactions on the network where all other miners will check the validity of the block on the basis of the existing blockchain.
So for miner having majority of hash rate ( more computational power) can easily add new block of its own transactions as well as can prevent other miners from mining new blocks( due to low computation power they can’t even find the solution to the problem before him) which leads the 51% attack on the blockchain.