When you choose direct deposit both are deposited into your account, but from two separate sources.
Your federal return comes from the IRS treasury department while your state refund will come from your state treasury department. They generally come at separate times.