Mattresses and Boxsprings are generally picked up as a bulk item with trash and taken to the landfill or incinerator. Companies offering junk removal and cleanouts will also remove bedding for a fee. If you have a newer mattress and boxspring in good condition, you may want to donate it to Salvation Army, see link at https://satruck.org.
The Consumer Affairs Mattress Disposal Guide can help in deciding whether to recycle, donate, sell or have a mattress hauled away.