Every tile turns. Work them around until the pipes join up and nothing is left dangling.
Click or tap a tile to turn it clockwise. Hold Shift to turn it back. Keyboard: arrow keys to move, space to turn, N for a new puzzle.