Both express future, but with different meanings: 'will' for spontaneous decisions or predictions; 'going to' for plans or evidence-based predictions.
Decisions made at the moment of speaking. Example: I'll help you!
Predictions based on belief or opinion. Example: I think it will rain.
Prior plans or intentions. Example: I'm going to study tonight.
Predictions based on what you can see. Example: Look at those clouds — it's going to rain!
Prior plans or intentions. Example: I'm going to study tonight.Decisions made at the moment of speaking. Example: I'll help you!Predictions based on what you can see. Example: Look at those clouds — it's going to rain!Predictions based on belief or opinion. Example: I think it will rain.