AMD interview question

How hash works? Difference between udp and tcp