If you're using fresh spinach, wash it in plenty of cold water, trim off any stems that are too long or damaged, and steam it for 10 minutes.
If you have a pressure cooker, use the steamer basket to cook the spinach, and cover without pressurizing. Otherwise, you can boil the spinach, but be sure to drain it well; otherwise, it will release too much liquid into the tart.
Drain the spinach thoroughly in a colander or sieve (press down with the palm of your hand or the back of a tbsp).