We use some and any with uncountable nouns and plural nouns. The general rule is that you use "some" in positive sentences and "any" in negative sentences and questions.
"I have some ideas."
"I don't have any ideas."
"Do you have any ideas?"
"I have some ideas."
"I don't have any ideas."
"Do you have any ideas?"
However, we can also use "some" in questions.
"Would you like some tea?" (I expect the answer to be "Yes".)
"Would you like some tea?" (I expect the answer to be "Yes".)
When we use some in a question, we limit what we are offering the other person.
For example, "Can I get you something to drink? – Coffee, or tea?" means I am offering you a limited choice of things to drink.
When we use "any" in a question, we are not limiting the choice.
For example, "Would you like anything to drink?" includes a whole range of things to drink.
"Do you have any questions?" (You can ask me anything you like!)
"Do you have any questions?" (You can ask me anything you like!)
We can also use any in positive sentences which have a negative meaning. We often use "any" with "hardly", "without" or "never".
"There's hardly any petrol left in the car – we need to go to a garage."
"He went out without any money on him."
"She never has any problem understanding."
"He went out without any money on him."
"She never has any problem understanding."