If you bought used and the computer was not setup per the instructions in What to do before you sell, give away, or trade in your Mac then I would recommend returning it for a refund. If you cannot afford a new Mac then you have much better options available to you. For example, please buy an Apple refurbished Mac. These are identical to new, have the same warranty as a new one, are available to buy AppleCare and can save hundreds of $$. In other words there is no downside! You can find these by navigating to Apple.com and then scrolling to the bottom of the page and click the Refurbished section.
If an Apple refurb is still too expensive then buy from a reliable reseller such as macsales.com. NEVER EVER buy from places like E-Bay, Craigslist, Facebook etc... You just DO NOT know what you are buying and in many many cases you are only inheriting someone else's problems.