There are two different meanings in 따르다.
1. 다른 사람이나 동물의 뒤에서, 그가 가는 대로 같이 가다.
means "follow, go after, tag along (with)"
2. 그릇을 기울여 안에 들어 있는 액체를 밖으로 조금씩 흐르게 하다.
means "pour, fill (sth with sth)"
In that sentence, 따르다 has the second meaning.
그는 오렌지 주스를 유리잔에 따라 몇 잔이나 마셨다.
He filled glass with orange juice and drank a few glasses.