You would indicate in the return that you lived in 2 different states. Then, TurboTax will be prompted to prepare the 2 state tax returns separately. TurboTax will ask you the questions that will guide you on how to enter and allocated the income that you made in each state and help you determine what is taxable in each state.
*Note: In most cases, you have to file a state return for each state that you lived in or earned income in. But some states do not have a state requirement. Seven U.S. states currently don't have an income tax:Alaska, Florida, Nevada, South Dakota, Texas,Washington and Wyoming. And residents of New Hampshire and Tennessee don't have an income tax but they do pay tax on dividends and income from investments.