The traditional rule says that “shall” indicates the future tense for the first person (I shall, we shall), while “will” indicates the future tense for the other persons (you will, he will, …), but this rule should now be considered completely outdated.
“Shall” as a future tense marker is almost non-existent in modern spoken American English. It is still somewhat widespread in British English but is also falling out of use there. In either case, it is still moderately common in formal texts.
If you are an English learner, it is safe to say that you cannot make a mistake if you only use “will” as your future tense marker. Most native speakers (of both American and British English) prefer “will” anyway, and it will save you a lot of trouble analyzing when “shall” is appropriate.
However, “shall” also has a few idiomatic uses where it cannot be replaced by “will”. For example, it can express an order or a threat:
It is also quite common to use the phrase “Shall we?” as a polite way to say “let’s go” or “let’s proceed”, often accompanied by a hand gesture showing the intended direction. For instance, when you meet a friend of yours in front of a café, you can point at the door and say: “Shall we?” Such usage is not considered old-fashioned.
“Shall” is also sometimes used synonymously with “should” in questions in British English. For example, a Brit could say “Shall we ask him about that?” instead of “Should we ask him about that?”, but you are unlikely to hear an American use it this way.
Nonetheless, apart from such idiomatic usages, English learners shall be advised to use “shall” only in formal writing; otherwise you run the risk of sounding old-fashioned or pretentious, depending on your conversational partner’s dialect.