RAW Data Hazard resolution
It depends on the context. From a computer architecture perspective, you can insert a hazard detection unit that inserts a bubble in the pipeline when it detects this condition. It's shown top/left-ish in this picture from Patterson&amp;Hennessy:



The logic doesn't do anything unexpected, it detects the case that an instruction in the ID wants to read a register that a memory read in the EX stage will write to, the instruction from the ID stage is then killed and PC is "held" so the instruction will re-execute.

From a programmer perspective, suppose there is no hazard detection unit, just insert the NOP yourself.