You can hire an attorney... but unless you have a close friend who will give you a good rate, that may not be cost effective. Lawyers will charge you hourly, and you need to be sure you have one experienced in real estate (most "friend" attorneys, in my experience, are family lawyers or otherwise not specifically qualified for real estate). Things change quickly, and a lawyer will not necessarily be familiar with all the standard forms, disclosures, and best practices.
You can hire a transactional licensee -- a real estate agent that just does paperwork but doesn't actually represent either party. I personally don't see the benefit of this, since they will charge just as much as an agent who *will* represent you, but it's an option.
Finally, you can bring in a real estate agent to represent you and/or the buyers. Of course, the best time to do this is *before* there's a buyer involved, since bringing an agent in "late" might be seen as changing horses in the middle of the race, or otherwise violating expectations of the buyer -- particularly if the buyer is represented by an agent (I'm assuming not, since you didn't mention that).
Here's an example from my own experience. A buyer I represented had verbal agreement with a "for sale by owner" seller, and I had a contract ready for the agreed-upon price with a broker's fee agreement for the seller (more on that later; it's basically a listing agreement for a single named buyer).
The seller never mentioned an agent to the buyer. Then I got a call; suddenly the seller had an agent, who said he was very sorry, but the price the seller had quoted the buyer was his *net* price (after all closing costs), not the contract price. The list price was now almost 30% higher, and I should submit any offers to him. Needless to say, the buyer walked, and I don't believe the property ever did sell.
So, if you haven't mentioned an agent before or factored closing costs (including commission) into the price you negotiated, you might be facing a similar situation. Remember there are significant irreducible closing costs even in an entirely private sale -- transfer taxes, lien letters, recording fees, pro-rated property taxes, etc. One of the things agents do is itemize all these costs and give you an up-front estimate, which along with the all-important market analysis can help guide your decision-making.
Assuming the buyer doesn't have an agent, and you want to hire one now, there are three options. Your agent can represent you alone (with the buyer unrepresented, which is rare), or you and the buyer (disclosed dual agency), or neither (transactional licensee). Either way the usual arrangement is a "broker fee agreement," which is essentially a listing contract with a named buyer. You as the seller owe a commission if that particular buyer closes on the house -- but you're free to sell it to anyone else yourself. (This is in contrast to the usual exclusive listing contract, where you owe a commission if it sells at all, no matter who brings the buyer.)
Generally the commission would be "half" an exclusive listing commission. Depending on the sale price, it might be 3%, 3.5%, or whatever you negotiate. There might also be a nominal flat fee portion of the commission, which would likely be charged to the buyer as well if the agent is representing both parties.
What the agent will do for that is write up the contract and ensure you've complied with all relevant PA laws and practices. For instance, have you provided the buyer with a fully executed PAR Seller's Disclosure form? Then follow through with the closing company to ensure they have all the documents necessary for closing. This can involve things like dye tests, final water bills, utility transfers, personal judgment clearance etc. If the agent also represents the buyer, he or she will do all the buyer work as well, principally dealing with the mortgage approval process, inspections, walk-through, etc.
Most of the work is actually after the sale!
Of course, it is always possible to keep it "for sale by owner" -- assuming again the buyer doesn't have an agent -- and do it all yourself (and a closing company; you can't avoid that). You will save the commission... but will then assume full legal liability for everything related to the sale, and will have to do everything the agent would have done. You still need to comply with all the relevant real estate laws (e.g., disclosures, municipal requirements), whether you know them or not. If all goes well and everybody's happy, this can work. But if something goes wrong and you get sued by the buyer... you'll have to deal with it yourself.
Hiring an agent can be a cost-effective way to not only make legal consequences a lot less likely, but also shift liability to a third party professional. You can do your own taxes and deal with the IRS yourself... or hire an accountant, who will hopefully do a better job *plus* take the heat for any mistakes