Two players take turns placing a piece of their own color (black and white) on an empty space on the board. The player that makes a line of five or more of their own pieces in a row wins. After each move, any groups of pieces of the same color which have no empty board spaces next to them are removed from the board.
Because the first player has a big advantage, the second player can choose, on the first move only, to switch colors. The first player then moves again with the other color and play continues normally.
A longer description and the official rules can be found on Cameron Browne's Pentalath page.