Review the logs first. Many sellers will have the logs scanned into a digital document, so you can review them with your mechanic without making a trip. The logs, if you read them carefully, will tell you a lot about the how well the plane was maintained. If you read between the lines, you can spot sketchy engines, prop strikes, hard landings, and much-too-deferred maintenance. If the logs check out, go see the plane in person, take it up for a test flight, and make sure everything works (or note what doesn't). At this point you will likely have enough information to make a tentative decision to purchase. If you know the reputation of the mechanic who maintained the plane and are satisfied with the logs, you may be good to go ahead with a purchase, with price negotiated based on the condition in which you found the plane in-person. Otherwise, you may want to arrange a mechanic of your choice to come with you, or if they are willing to fly the plane to you for a quick pre-buy inspection prior to purchase. A pre-buy is not an annual inpection, but just a quick go-though to ensure there are no red flags. (Reviewing the logs will ferret out some of the red flags if present.)
For my current plane, I drove out to the owner's airport (about 5 hours), reviewed the logs myself, and took it up for a 1 hour test flight. There were some cosmetic issues, but all the avionics worked and the plane was in proper trim and performed by the book. (Sub-book performance would be a red flag.) I made a deposit, and arranged for the owner to deliver the plane to my airport for a quick pre-buy inspection by my mechanic, with the expectation I would hand over a cashier's check for the agreed price the same day if everything checked out OK. (It did. Basic engine check OK, no internal airframe corrosion or deteriorated rigging.) The plane was maintained by a well-known Grumman mechanic in the NE, so I was relatively confident that the plane was properly maintained and did not expect any major issues. I was already trained in Grummans (AA-1 through AA-5B) so transition training was not required. (However when I bought my first plane, an AA-1A, the owner/CFII/ATP gave me 1 hour of transition training for free prior to sending me on my way.) Transition training is highly recommended for a new type, even if you read the POH like Sherlock Holmes. All in all, my purchase experiences were pleasant for both seller and buyer. I did find a clunker or two looking for my first plane, and the same when helping a fellow pilot find his forever C-172. There are some really badly maintained examples out there. We saw a lot of planes that we would not be comfortable taking a test flight in after reading the logs and looking at the aircraft.