You may think that the best way to avoid a lightning strike is to make sure you take refuge under something taller than you are so that the lightning will strike it instead of you. This video from MinuteEarth explains why that's actually not the case and what you can do if you're caught in an electrical storm.
Granted, the video starts off with the best hypothetical material to wear if you happen to be headed into an electrical storm. But since most people don't own suits of armour or Faraday suits, your best bet is to avoid open areas when the lightning and thunder start, and to take shelter indoors or in your car.
If you have to be outside for the duration of the storm, their tip at the end -- to squat down with your feet close together -- is a good one for several reasons, namely that you minimise the distance along your body electricity has to travel to get from the air to the ground. Hit the link below (or just watch the video above) to see a visual description of why it all works.