"A plant in the wrong place" is the simplest definition of a weed.
Perennial weeds spread by seeds and roots, annuals by seed. Truth is, that every square foot of agricultural soil or urban garden soil can contain thousands of weed seeds per square foot. Under the right condition these seeds will germinate -- "right plant, right place." One way to rid the garden of perennial weeds is by digging them up, but you must get all the roots so the plant won't come back or spread. There is no need to use "round-up" or other toxins to kill off these plants. Remember,.. what toxins you put into the soil, remains in the soil. Vigilance and proper maintenance is the answer.
The best prevention of perennial weeds is to mulch, which suppresses the weed growth (among other benefits).
If you do have weed growth, remove them before they go to seed otherwise you are setting yourself up for future frustration.
If you do make you own compost, do not put seed heads in with the compost. (Vegetable and fruit scraps are great, but edit out items such as pepper seeds which may eventually sprout in your garden.)
As a Manhattan garden designer I identify local weeds with the text "Weeds of the Northeast" by Uva, Neal and Tomasso.