A miner must create a block whose header, when hashed, is numerically less than or equal to the target value for the block. Each block contains a list of transactions whose merkle root is included in the block header, and the list must have at least one transaction in it, called the coinbase.
The coinbase collects all fees of other transactions in the block (the difference between the sum of outputs and the sum of inputs of each transaction is its fee), and adds a subsidy, which was initially 50 BTC, but halves every 210000 blocks.
The coinbase can have any regular outputs like any other bitcoin transaction, as long as the sum of the output amounts is less than or equal to the sum of all fees in the block plus the subsidy. Usually, the miner will put their own payout address in the block template which they attempt to perform work on.
The potential for earning partial bitcoins is a system built separately from the bitcoin protocol, in which miners pool their computing resources to collectively attempt to mine a new block. The block reward is then distributed among the members of the mining pool according to the amount of work they contribute. This distribution can be achieved directly and without the need to trust a pool operator, by having each miner's reward being paid out directly as a coinbase transaction output.