Some typically implies a specific type or form. For example: I bought some candles. Some of my Facebook friends live in San Diego.
Some is only used in a question when an offer is being made, or there is a request for something. For example: Do you need some assistance? Could I have some more of that pecan pie?
Use any when you’re talking about something that is not specific. For example: I don’t want any help. There isn’t any pecan pie.
Any also describes an indefinite or an incomplete quantity when the speaker can not, or does not need or want to specify a number or an exact amount. For example: He does not have any friends on the team.
To learn more about the differences between similar words, read this blog post about who’s vs. whose.