Some and some of

Some is a determiner. It suggests and indefinite quantity or number.

I need to buy some clothes.

Some is used when it is not necessary to say exactly how much or many we are thinking of.

Some and any

As an indefinite pronoun some is more common in affirmative clauses. In other cases we generally use any.

There are some children in the garden. (NOT There are any children in the garden.)
There is some water in the bottle. (NOT There is any water in the bottle.)
Are there any children in the garden?
Is there any water in the bottle?
No, there aren’t any children in the garden.

Some can be used in questions when we expect the answer ‘Yes’.

Do you mind if I put some music on?

Some and a/an

Some is quite similar to the indefinite article a/an. While a and an are used before singular countable nouns, some is used before plural and uncountable nouns.

Compare:

I need to buy a new shirt. (singular countable noun)
I need to buy some new shirts. (plural countable noun)
I need some help. (uncountable noun)

Some and some of
Before another determiner or a pronoun, we use some of.

I know some of his friends. (NOT I know some his friends.)
Some of us want a new system. (NOT Some us want a new system.)

Before a noun without a determiner, we use some.

Some people are very ambitious. (NOT Some of people are …)