Underneath my middle finger nail is yellow and when I press on my finger it hurts really bad. What is that?

Infection. You probalby have an infection of the nail bed called paronychia. This causes pus to accumulate at the nail root and it hurts due to pressure. You will need antibiotics and also the nail may need to be lifted to allow drainage.