There are many explanations of when "will" is used and many explanations of when "going to" is used, but the main thing to bear in mind when choosing between these two tenses is:
Going to is used when we have decided to do something before the time of speaking and will is used when we decide to do something at the time of speaking.Here are some examples:
- I'm going to the nightclub, are you guys up for it?
- I'll go!
- Let's go the the park this Saturday for a picnic.
- Great idea! I'll bring some sandwiches.
- Cool. I'll bring some drinks.
- We're going to have a picnic on Saturday. I'm going to bring some sandwiches and my friend is going to bring some drinks.
There are lots of other ways to illustrate the question of will or going to, here are just a few:
- Will is used for offers (I'll help you), promises (I promise I'll call you), and requests (Will you pass me the salt please?)
- Going to is used when you base a prediction on something you can see (look at the blue sky, it's going to be a nice day today).