Forward pass sets ES/EF left→right (take the later predecessor at a merge). Backward pass sets LS/LF right→left (take the earlier successor). Float = LS − ES; zero float = critical.
Forward: EF = ES + Dur − 1
Backward: LS = LF − Dur + 1
Total Float = LS − ES = LF − EF
Free Float = ESₙₑₓₜ − EF − 1
Critical path = longest path = zero total float. (Drop −1/+1 if counting from day 0.)
Both target the critical path — compressing anything else won't shorten the project.