The traditional method of earning frequent flyer miles, so you can fly free, is to pay for airline tickets and accumulate actual BIS (butt in seat) mileage. This still works. Fly 1000 miles, get 1000 frequent-flyer miles.
There are ways you can maximize this benefit. If you have status on an airline, like gold or platinum or executive platinum (the names vary), you often will receive more frequent flyer miles than the distance actually traveled.
And, airlines often have promotions offering double or even triple miles for passengers. But, you generally need to sign up in advance for these promotions.
If you purchase airfare with a credit card, try to use one branded by the same airline in order to maximize your mile earning power.