Note: As of February 9, 2023, Twitter will no longer support free access to the v1 or v2 API endpoints. Details about a paid basic tier are forthcoming and there will hopefully be clarification about how these changes will effect the academic researcher track.
There are now a number of options for capturing tweets from the Twitter API. All options require a Twitter account and some will require creating an app with Twitter (this requires associating a phone number with your Twitter account) in order to generate the necessary credentials (keys and access tokens).
When using the Twitter API, the default search ("recent search endpoint") provides access to tweets that are no more than 7 days old. If you need historical tweets, academic researchers can access (as of January 26, 2021) the full archive. Note also that there are some collections of Twitter data that have been made publicly accessible (see the "Twitter Data" page).
If you would like to collect your own Twitter data, see the list of software links on the "Collecting Tweets" page.
If you are looking for software to analyze Twitter data - networks, mapping, textual - see the "Working with Tweets" box at the bottom of the "Collecting Tweets" page.