Both the words "some" and "any' are use for countable and uncountable nouns. Some means a few or a little. And any means none in negative sentences, and a few or a little in questions.
Positive sentences: we use "some",
Example:
I have bought some bread.
I have bought some apples.
In negative sentences, we use any,
In negative clauses, we use any. Note, however, that any alone is not a negative - it must be not ... any
Example:
I have not bought any bread.
I have not bought any apples.
In questions, we usually use any.
Example:
Have you bought any bread?
Have you bought any apples?