First of all, they are called indefinite pronouns. these words are not used to refer to people. they are used to refer to things. the correct used of those words depends on whether the sentence is affirmative, negative or interrogative.
"Something" most of the time is used in affirmative sentences. For example: Something is going wrong. or You have something to tell me.
However the pronoun "Anything" is a little bit different, because its meaning depends on what you really want to say or it changes according to the function of the phrase, it can be used in both ways, negative or affirmative. E.g: You can do anything. In contrast with the negative form you have to be careful with the negation of the auxiliary verbs and other words like "Never" or "No" that also imply a negation. For example: I have never anything to do or I don´t have anything to do.
By other size, the indefinite pronoun "Nothing" always means negative and it is used with the verb form in an affirmative way. E:G: I have nothing to do. You can not used the auxiliary verb with the negative form.
Finally, the word "Everything" refers to something that is related to the subject of a statement and to show importance of a single thing. E.G: This book means everything to me.