A lot of the time, people will end up with domain names that they buy are banned from Google. It means that domains may either be blocked from parking or ultimately deindexed by Google. The thing is a lot of the sites which have these penalties used to be ranked in the Google search engine, and may still even have traffic pointing towards them. It is up to you to weigh up whether it is worth owning these domain names or not.
The vast majority of domain names that are banned from Google have been done so because they have a lot of spammy links directed to them, and if you never remove these backlinks (or at least put effort into it), then you may find that it may be difficult to get the penalty removed.
Your first option to remove these spammy links is to contact the site owners who are pointing the domain names towards your site. You will need to supply Google with proof that you attempted to do this. If the site owner is not getting back to you, Google has a disavow tool which you can use which will disregard these links.
→ Do NOT use disavow tool if you’re not sure how to use it! ←
There are other reasons why the site may be banned, though. If it was entirely of spam content in the past, you might find that it is difficult to get the penalty removed, no matter what you do. It is not worth buying these domain names. You should probably avoid most domain names that have a penalty because the effort to get them removed is too much. You would be better off buying a domain name for which you know that it is certainly not penalized.