"...can you please explain to me how a fish (a few million years ago) decided that it would be a good idea to suck up a few mouthfuls of air..."
Well, I mean, part of the problem -- which is not, I hasten to add, at all your fault -- is that there isn't really a moment where such-and-such an animal "decides" to do anything in terms of evolution. It's an unconscious process driven by natural pressures.
So, for example, the fish you mention might have been struggling to compete for food in the oceans. If, however, it was capable of just about surviving for a little while without breathing through gills, then it might have found the relatively empty lands a beautifully rich source of food, with very little competition. So any animals with that lucky "I can breathe air" modification would do rather well, have lots of food, lots of energy to make babies, better chances to avoid predators, etc etc.
I suppose this means that basically the answer to your question is that things happen in reverse:
1. Animals develop modifications, because of random mutations in DNA, etc.
2. These mutations turn out to be useful, because they make it easier for the animal to survive in their environment.
3. Animals that live longer have more babies.
4. Those babies are likely to have the same features.
5. That modification gets reinforced through the generations.
And, voila, after a few hundred thousand years, maybe you end up with a new species. Sometimes it's a small change, other times it's quite a big one. But the change happens before it's discovered whether it's useful or not.
Hope that makes a bit more sense. I'll have another go altogether.