You can turn the pipes from level 4, there is a tutorial for this =)
Rotation is carried out by clicking on the corresponding pipe icon. The pipe turns 90 degrees, if it encounters an obstacle, turn again.