Goodness of fit describes how closely a statistical model agrees with observed data. It may be summarized by a discrepancy statistic, residuals, or a graphical diagnostic. A goodness-of-fit test compares a chosen statistic with its distribution under a null model, while quantities such as the coefficient of determination summarize fit without by themselves constituting a test.
A good fit does not establish that a model is uniquely correct, since distinct models can fit the same finite data and a test may have low power against relevant alternatives.