When the seed germinates, the little seedling probes around for a host plant. When it attaches to the host, the base of the dodder dies and from thereafter it gains all its sustenance by sucking juices out of the host plant. These plants do not have chlorophyll, so do not necessarily look green. Usually they are reddish, orange, yellow, or transparent. Pretty weird stuff.
Some plants are only partial parasites.
Sure, it has chlorophyll and so makes some food for itself, but it requires a plant host.