What happens to your Twitter account when you die depends on a few things, including:
The surest way to know what will happen to your Twitter account is to make a plan and leave any necessary instructions to the people who will be wrapping up your estate.
If you want someone to access to your Twitter account, leave instructions about 1) how to log in to the account and 2) what to do with it. Twitter's Terms of Service (TOS) -- that you agreed to when you signed up for your account – state that you can't transfer your account to another person (because it's a non-assignable license), so giving someone else your user name and password will probably only work as long as Twitter thinks you are still alive. Practically speaking however, it is the only way to give someone else access to your account.
If you want to keep your account private, you can make a plan for that too. You can:
Twitter does not currently allow you to decide what should happen to your account when you die, but it might someday. Tech companies are recognizing that users might want a choice about whether their accounts should be deleted, archived, or passed onto another person. And some companies are providing tools that allow account holders to decide the fate of their accounts. For example, Google's Inactive Account Manager allows account holders to decide whether to delete the account or pass (some) account information on to survivors after a period of inactivity. Keep an eye out for Twitter to provide a similar tool.
If you don't make a plan for your Twitter account (and no one hacks into it), your account will be deleted after 6 months of inactivity. If you do not want anyone to have access to your account, and if you expect that no one will try to access your account, this "do nothing" approach could work well.
However, doing nothing will likely have an undesirable outcome if you want to either 1) give your survivors access to or data from your account, or 2) really make sure that the account remains private. On one hand, unless you leave instructions, the person wrapping up your estate will have a very difficult time accessing your account. On the other hand, in some states, your executor may be able to get access even if that's not what you want.
Twitter is clear that it will not give your executor – or anyone else -- access to your account unless it is legally obligated to do so. Until recently, those legal obligations have been few and far between. However, the law is changing and, in theory, your executor's ability to access your account could vary by state.
In the few states that have laws granting executors authority to access digital accounts, "account custodians" like Twitter could be required to provide access to executors. So an account that you believe to be private could be made available to the person wrapping up your estate. These are new and untested laws, and you can expect most technology companies to resist providing access to accounts, even in the states where the law requires it to do so.
You can learn more about this, including information about your state's law on Nolo's Digital Assets page.
If you do not make a plan, after your death your Twitter account will probably continue to exist for 6 months and then Twitter will delete it. Depending on your state, your executor may have a slim chance to gain authority over your account, but it will be a struggle.
If you want to control what happens to your account, either plan for it to be deleted, or tell your loved ones how to log into it and what to do with it when they get in.