Fish and seafood are the only foods that directly provide the complex omega-3 fatty acids that the brain needs (EPA and DHA). Similarly, meat and dairy produce are the main dietary sources of the complex omega-6 fatty acid AA.
If these foods are not included in the diet, then these highly unsaturated fatty acids (HUFA) must be produced within the body from simpler essential fatty acids (EFA).
Vegans therefore rely on this conversion process to obtain an adequate supply of both omega-3 and omega-6 HUFA. Vegetarians who consume dairy products and/or eggs may obtain adequate AA directly, but unless supplements or fortified foods are used, they must still rely on EFA-HUFA conversion to obtain the complex omega-3 fatty acids EPA and DHA.
For omega-3 fats the 'parent' EFA is alpha-linolenic acid (ALA), found in green leafy vegetables and in some nuts and seeds - most notably flax or linseed. For omega-6 fats, the 'parent' EFA is linoleic acid (LA), found in most vegetable and seed oils.
Vegetarian diets often contain a particular excess of omega-6 relative to omega-3 EFA (although this pattern is also characteristic of most modern 'Western' diets). The same enzymes are used for HUFA synthesis in both cases, so this imbalance can increase the risk of omega-3 HUFA deficiencies in particular.
This information sheet from the Vegetarian Society provides a clear explanation of these issues, and gives useful practical information and advice on how vegetarians can improve their EPA and DHA status.
(The picture below is taken from their entertaining campaign designed to improve public awareness that fish are not vegetables!)