Matt Cutts, Google’s head of search spam in response to a question asked about buying a domain that had spam on it and still rank it, and he advised against it. While it is very possible to do, for certain reasons, you would rather considering starting a fresh and build from there. You can expect two types of penalties one to get from acquiring such a site, one on the manual side or on the algorithm side. If it is a manual penalty you can fix it and submit a reconsideration request, if its an algorithm penalty you will have to be patient and wait for the algorithm to pick up the changes. Do not forget, depending on how aggressive the spam was the harder it will be to recover from it.
The process that it takes for this reconsideration to be done is a gruesome and quite frankly one that need not be so. If it were up to Matt he would pass the domain by and rather start a clean slate. You need to be careful with spammed sites, like Matt says some have been run down to the point of no return and sell them on forums to try get something out of it. You don’t need that!