Merkle Interview Question

How are ads ranked on Google?