Clamps are used to support and secure pipes along walls or ceilings, ensuring proper alignment and stability.