You use the words some and any when you don’t need/want to specify a certain number or amount. When you say I saw some people gathering in the city hall, that means definitely you saw more than one person there, but you don’t know exactly how many people were there in the city hall. Or, you might think that it is NOT important for people to know how many people you saw in the city hall. Thus, the word some here refers to an unspecified number of people you saw.
Both some and any are used with countable and uncountable nouns. Look at the following examples:
a. I met some old friends at the party last night. (friend is an countable noun)
b. I added some sugar into the coffee. (sugar is an uncountable noun; in this case some probably means something like not too much, not too little).
The general rule is that you will use the word some in positive sentences, and any in negative and interrogative sentences. Observe the following examples:
a. Thanks to Andy. He had some great ideas as to how to keep our business growing.
b. Andy, do you have any ideas to keep our business growing?
c. I don’t have any fresh ideas as to how to keep our business growing.
But, you can also use some in questions when you are OFFERING OR REQUESTING. You use some because you are expecting a positive response.
a. Would you like some red wine? (You are offering, and you expect the person says yes)
b. Can I have some water, please? (You are requesting, and you expect the person says yes)
On the other hand, you can also use any in negative sentences when you want to say it doesn’t matter which. Thus, the sentence ‘You can come any time’ means it doesn’t matter what time you come, it’s up to you. Look at the following examples:
a. Well, you can pick any book you want. (It doesn’t matter which book)
b. You can have any of these bikes. (It doesn’t matter which bike you choose)