Airplanes are not unaffected by wind and indeed often face considerable headwinds. However, powerful engines enable them to fly at a consistent groundspeed despite facing headwinds.
Contrails form behind aircraft as a result of hot jet exhaust mixing with the colder surrounding air, condensing water vapour into visible ice crystals forming a contrail. They may appear to trail behind planes or remain stationary relative to the ground in certain atmospheric conditions.