It depends what kind of miles you mean and what kind of earning you mean.
If you mean you can you book a plane and earn miles for that trip without actually flying on the plane, no.
If, on the other hand, you mean are there other ways to earn miles besides flying:
There are two kinds of mles: Redeemable miles, which you can use for flights, and status-qualifying miles, which you can use to earn status levels.
You can earn redeemable miles from hotel stays, rental cars, shopping, dining, paying with the right credit card, etc, etc, yes.
With a few limited exceptions, you can't earn status-qualifying miles without actually flying, no.