We study effects originating from the strong spin orbit coupling in CoFeB/MgO heterostructures with heavy metal (HM) underlayers. The perpendicular magnetic anisotropy at the CoFeB/MgO interface, the spin Hall angle of the heavy metal layer, current induced torques and the Dzyaloshinskii-Moriya interaction at the HM/CoFeB interfaces are studied for films in which the early 5d transition metals are used as the HM underlayer. We show how the choice of the HM layer influences these intricate spin orbit effects that emerge within the bulk and at interfaces of the heterostructures.