Will is used to talk about spontaneous decisions or predictions about the future, while To Be Going To is used to talk about plans, intentions or things that are already arranged to happen in the future based on present evidence or signs. Both will and be going to can be used to talk about the future, but they imply different levels of certainty and intention.