Not all ICOs are scams, but there are a lot of scam ICOs.
You need to look at the team behind the operation, if they have a real world product, what the future plans are. Ask yourself are they solving a real world problem is is it another spin on a new decentralized currency which does absolutely nothing new. Don't rely on Google Adwords advertising.
Similar to the stock markets, there are scams but there's also many legitimate companies.