A VBA Sub is a named procedure. Statements run from top to bottom between Sub and End Sub. Read the destination on the left of an assignment and the expression on the right before you run the code.
Range("B5").Value addresses a worksheet cell. Cells(r, 3) addresses row r in column C, which is useful in a loop. Dim declares a variable. For r = 2 To 4 includes rows 2, 3 and 4, while For Each visits each cell in a range. An If block chooses a branch, and Do While repeats while its condition remains true.
Predict which cells will change and what ends a loop. A loop that never changes its condition won't finish. The practice runtime stops runaway code, so you can correct a loop and run it again safely.