To get an extension on filing your taxes, you can submit IRS Form 4868, Application for Automatic Extension of Time to File U.S. Individual Income Tax Return. The form can be filed electronically or by mail and must be submitted by the tax filing deadline, which is typically April 15th.
Submitting Form 4868 will give you an extension of time to file your tax return until October 15th. It's important to note that this is an extension to file, not an extension to pay. You will still need to estimate your tax liability and pay any taxes owed by the original tax filing deadline (April 15th). If you don't pay at least 90% of the amount you owe by April 15th, you may be subject to penalties and interest.
Keep in mind that if you are a U.S. citizen living abroad or serving in the military outside the U.S., you may be eligible for an automatic extension of time to file and pay your taxes.