A strainer is used to remove unwanted particles from a fluid or gas. Strainers have various shapes and sizes, including basket strainers, T strainers, and Y strainers. They are commonly used in pipelines, valves, and pumps to prevent damage and blockage caused by foreign particles such as dirt, debris, and sediment.