What happens with the transactions a miner didn't include in a block?
Transactions A,B,C will be validated and added to the miners memory pool just like any other node does. If A and B are the only ones added to the next block then c will remain in the memory pool and will later be joined by D. So C and D will remain in the memory pool until they are added to a new block while A and B will form part of the new block. If the miner is successful in solving the proof of work then his block will be propagated to other nodes and if it is accepted it will added to a chain. When the miner receives a new block from the network, then the software does check if the new block has transactions that are in its memory pool and will remove any transactions from the memory pool if it is in the new block.