Is it safe to take an aspirin every time you fly to prevent something bad like a DVT from happening?

It Depends. Aspirin has been in use for many decades and is very safe for most people. It may cause serious side effects in some people and you should ask your doctor if it is safe for you. However, Aspirin has not been found to be an effective prevention of blood clots in any circumstance. Most people don't need prevention for short flights. For those at high risk other therapies are recommended.
If depends. Aspirin is an anticoagulant (blood thinner) which is readily available otc. However, it is not cannot be used by everyone. It can contribute to bruising, prolonged bleeding or internal bleeding. If you don't know your risks for having a blood clot, consult your md before traveling asking if Aspirin is the correct choice for you and what other preventive measures you may take.
+/- If you can take Aspirin safely, then it probably won't hurt to take one before a flight. On the other hand there is very limited evidence that taking a baby aspiring when flying helps to prevent a dvt. There is more evidence that it doesn't make a difference. Walking and hydration are more important, especially on long haul flights.
Yes. Good idea. Also stay hydrated and try to flex calves and get up when you can to help blood flow.