Susan Byrer's answer is very thorough and I can not add much more. I would tell you though, that if you've occupied it as a your primary residence, you can keep any amount of profit up to $250K for a single owner or $500K for a couple, tax free. You can invest it in another home, but it is not required. If it was an investment property, you may want to do a 1031 exchange. Either way, talking to a CPA is the best first step. No one likes tax surprises.
In Sonoma County, it is customary for the buyer and seller to split fees in a certain fashion, but of course everything is negotiable. Most common is as follows. First, if you engage a real estate agent, you will sign a listing agreement with that Realtor to pay their commission -- an amount to be negotiated between you and your listing brokerage. Usually one-half of that amount is offered to the agent representing the buyer. Second, you will be expected to pay the transfer taxes for both the City of Rohnert Park and the County of Sonoma, which will amount to $2.20 per thousand of sales price (so, for a $500,000 home your transfer tax is $1100.00). Third, you will be expected to pay for the Natural Hazard Disclosure, approximately $99.00. Fourth, you may wish to obtain a pest report prior to listing, so that you have current information on this aspect of the property when you price the house. These run about $250.00, and are, of course, optional. Fifth, you will have small title and escrow fees related to wires, doc fees, etc., probably less than $100. Sixth, if there are property taxes due these will need to be brought current in order to close the escrow, and/or you may have some prorated taxes that will need to be paid through escrow. Seventh, you may have fees associated with your loan(s), which your mortgage broker for your purchase two years ago would need to review with you so you have no surprises. You should fully understand your payoff requirements for any loans or equity lines on the property.
Finally, depending on when you purchased the home, whether or not you occupied it, how much you have invested in upgrading it, and when it closes escrow, you may or may not have tax consequences that would be beyond my expertise to advise or estimate. For that, please consult a CPA.
Many of the fees associated with selling your home are actually negotiable, including the sales commision rate you establish with your agent. The other fees to possibly expect consist of Title and escrow fees, transfer taxes and property reports. Again, all of these are negotiated at the time an offer is made as part of the contract. As far as taxes go, that depends on whether or not the sale results in profits. You do have a capitol gains exclusion that allows you to keep up 250,000 in gains without paying taxes as long as you hold the home for 2 years. I have a great track record selling homes and providing excellent service to my sellers including free home staging and reasonable commission rates. Let's discuss! Call me at 707-280-6523 or email firstname.lastname@example.org
As far as fees go in regard to selling real estate, you can expect to pay a commission to your real estate broker, traditionally the seller pays county and city transfer tax, minor escrow fees and if you have any prepayment clauses on your mortgage, that may come into play as well. Every house is different.