Mining software and miners verifications and how accept transactions
There are many approaches to mining.  

The leading approach nowadays is to use Getblocktemplate.  The wiki page for that includes a relatively easy to understand example. 

There is an implementation in Python called python-blkmaker.