These models are just computer code translations of physical equations mainly. You get an equation to model how air (fluid) moves, code it up, set up a numerical process to integrate over a small time step. Depending on how many assumptions you want to make the equation can be relatively simple or highly complex.
In short, it's fuckin insane. This has some good stuff in it https://www.ral.ucar.edu/projects/armyrange/references/forec...