Are there good ways to avoid blood clots in the lung?

Yes. Stay out of the hospital (its one of the more common complications of being confined to a bed) stay active, don't smoke, and pick the right grandparents (risk for blood clots is partially hereditary). Other known risk factors include looooong flights or car rides without intermittent exercise (over 5 hours), obesity, contraceptive use, and heart failure. Prior clots are the biggest risk factor.
Yes. Don't smoke. Exercise - avoid long trips in cars and prolonged sitting in the same spot. Keep your weight down. If you are at increased risk, avoid birth control pills or other estrogens. Talk with your doc if you have a family history. You may need specific tests and specific medication.