The pool heater should be placed after the filter. The water flows into the pool heater after passing through the filter. There is usually a water bypass valve at the heater's intake, allowing water to bypass the heater if needed. This setup ensures that the water is properly filtered before it reaches the heater.