Proof of Work:
When a miner gets a set of transactions (a block), the miner has to solve a mathematical problem. This mathematical problem can be solved only through brute-force method. When a miner gets a solution to the problem, he broadcasts it to the network. All the other nodes in the network validates this, and confirms whether the solution is right or not. If the solution is right, then the miner gets the reward and the block is added to the chain as the new block.
What does proof of work solve?
Proof of work prevents any malicious activity on the network. Suppose a malicious node tries to add a malicious transaction to the Blockchain or tells that he has solved the mathematical problem (without actually solving it), then other nodes in the network identify this activity and rejects the transaction. This is how proof or work helps in validation of block and provides security.