When you cook spinach you are removing water from the leaves, causing it to shrink. You will easily notice that this ingredient gets softer and slimy, and acquires a much darker green color. When this process stops and the spinach no longer shrinks then it is ready to eat.