Yes, you will generally have to file a tax return for both states. If you moved to the new state, you will file a tax return as a part-year resident for each state. It's a good idea to prepare the state you moved "from" prior to the state to which you moved so you can get any applicable credits for taxes paid to the other state (assuming both states have income taxes)
If you didn't move, but just worked in the other state, you will file a Non-Resident tax return for that state and as a Resident return for the in which you live.
As you go through the state sections, make sure to allocate the income earned to each state. Pay special attention to any blue text links and the wording of the questions.
How do I file if I moved to a different state last year?
How to file a non-resident state return?