The basic point is that if you're not eating meat and fish, you need other foods to get protein from. Eggs, milk and cheese will do that for a vegetarian. A vegan doesn't eat those either so you're looking at proteinous plants - beans and pulses. Anything that is basically a seed of a plant is like that plant's egg and will give you protein, so lentils, chickpeas, quinoa, soy beans, kidney beans, all kinds of beans... and nuts are all useful to vegetarians and vegans. Look at a vegetarian cookbook and you'll find all of those feature a lot.