A weed is a plant which is growing where it is not desired, or a plant out of place. For instance, maize growing in a peanut field is a weed. Wheat growing in a cotton field is a weed. A weed can be any plant type which is not contributing to the profitability of the farm and can be plants such as; trees, broad leaf plants, grasses, sedge, aquatic plants and various other parasitic plants.
A weed is a pest which increases the cost of farming, it reduces the economic yield of the crop through increased production costs and reduction of marketable yields. Weeds are controlled with pesticides just as insects are controlled with pesticides and fungi and bacteria are controlled with fungicides.
A weed is also the wrong plant in the right place. Something like that anyway. For instance, if you are growing tomatoes and the previous crop was sweet potatoes, the new growth of sweet potato seedlings in the second season can be considered a weed. They are consuming valuable nutrients and water from the soil from which you will not be deriving any economic advantage. In this case the sweet potato is a weed and must be removed while you are growing tomatoes. You might come back in a year or two and grow sweet potatoes again, well in that instance the old sweet potato re-growth is a welcome bonus.
So weeds can be ‘bad’ plants but also good plants. They are just out of place. In non-commercial fields or recovering fields weeds play a very important role in helping to establish new vegetative growth. They are also often referred to as pioneer plants since they are such strong growers in their specific micro-climate niche. Some weeds grow well in dry arid open fields with hardly any competition with very poor soils. Add a little fertilizer and it immediately reduces their growth. Some weeds grow best in rich fertile but cold soils.