I just did this 2 years ago. We simply went to the same lawyer that set up our incorporation and we already had a buyout price and terms established between the two of us. After that the lawyer simply reassigned his shares of the company back to us. We removed his name from all parts of the company (which released him from any liability that the company might incur), reassigned the officers within the company and that was that. Obviously there were a LOT of other details such as assets, no compete clauses, liabilities from existing contracts and other financial matters.
But all in all, just make a basic outline of what you would like to achieve BEFORE you go into the lawyer. Our lawyer was $250 an hour...and then the lawyer can do his thing more efficiently. And that is the key, make it easier for the lawyer because even though we had everything laid out for him it still cost us over a grand. But it was money well spent.
The buyout arrangement was made over the course of 1 year. I gave him a check for "X" amount of dollars on the day we reassigned shares and then every quarter thereafter. It was very smooth and we still remain best friends to this day.
The key here is to find a good lawyer, after that the buyout is very simple. Just make sure both parties are getting what they rightfully deserve and follow the terms of your agreement. Piece of cake.
Good Luck!