Commonly, the F18 error occurs in Siemens washing machines when there is a problem in the drain pump or its filter. Most likely, it is jammed or clogged.
Here are steps on how to fix the problem: this will take a little insight into the drain pump and the related system.
Please, take precautions: disconnect the washer from the mains and prepare tubs, buckets and rags in case a lot of water pours out.
The filter is located behind the lower kick panel at the front side of the washer. However, in some models the panel is found on the rear side. The panel are either screwed or hooked to the body. Usually, filters can be removed by turning a round knob or cover. In some cases, it takes a bit of effort to pull it out.
Some people find more than they expect in there. In any event, it is strongly recommended that you check the motor and the motor filter regularly.
Once the filter is out, the motor will be clearly visible. So will be items and debris, if any, blocking it. Remove the stuff and try to rotate the rotor by hand. It should not be stuck.
When you have cleared all foreign objects and debris (if any) from the motor compartment, connect it to the mains and run a spin cycle. You will see the rotor turn at a moment. Check if the motor can be slowed down easily using a soft object (for example, a glove). If it can, there is a problem in the motor. In this case, you will need to repair or replace it.