You don’t need to look up how a p value is calculated, the calculation depends entirely on your model and hypothesis assumptions.
The best way I’ve heard a p value described was “the degree to which the data are embarrassed by the null hypothesis”. It’s the most succinct, correct, and easy to remember description.