In Rugby Union, the ball must be passed backwards out of the hands. The ball can travel forwards in an absolute manner, but must be passed backwards relative to the players moving.
How do teams gain field position?
Teams can still run forward while passing. Even though the passes are backwards, a team can make progress. For example, running 5 metres forward and passing 1 metre backwards will gain them field position.
Teams can also kick to gain territory, but this will often give the opposition possession.
What if a pass goes forwards?
This is a minor infringement. The other team will be awarded a Scrum.