That's a very, VERY broad question, and there is no one right answer. Have you researched timeshares of various types, to get a feel for what works for your budget and available time schedule? Can you plan well in advance, or do you do things at the last minute? Are you interested in a Fixed or Floating Week, or a Points ownership? Do you want to own in a major system, like Wyndham or WorldMark, or a hotel chain system, like Hilton or Marriott? They each have their own particulars when it comes to buying.
Once you've made some decisions, the general process is this: You find the timeshare you want to own. Once you and the Seller agree on a price (whether through a Broker or someplace like Tug or eBay), you sign a Purchase Agreement document, which states that you are committing to purchasing the timeshare. Once you've provided the payment and information to be recorded on the deed (if it's a deeded timeshare), the Seller (or a third party closing company) processes the paperwork, records it with the State of registration for the timeshare, the Resort (if there is one) is notified of the new ownership, they then transfer the title/registration to the names on the new deed, and everyone is notified that the ownership has transferred. This process can take a few weeks to several months, depending on all the details of what's what on the purchase. (Again, no simple answer.)
That is best-case scenario. But if you buy frivolously, without doing your due diligence, there might be outstanding debt or contract fees against the deed, which someone (probably you) will have to pay. Timeshares are a dime a dozen, and it's very easy to get into one, but can be very difficult to get out of one. So you owe it to yourself to do some research ahead of time, figure out what you want to own, find out the best way to buy that one, and THEN start your purchase process. Being cautious to buy is a very good place to start.
Hope this helps a bit.
Dave