How do you model
The most common way to model electronic hardware is Hardware Description Languages (HDL). It often isn’t feasible to test and create full hardware in CAD or other design methods, either because it would take too much time, or because simulating is too intensive. As a result, hardware description languages were developed to be able to describe how a circuit or device should act, and it gets synthesized to run on FPGAs. This level of writing code is different than writing in a programming language. Instead of sequential code execution, the code is simulated like actual hardware. Look at System Verilog and Verilog to understand what runs when and how. This is called Register Transfer Level (RTL) programming.
Eventually, it is important to test the RTL code on an actual hardware device instead of software simulation. FPGAs are Field-Programmable Gate Arrays, specifically meant to be able to test hardware. The RTL code gets synthesized into a structure of wires and hardware, and the FPGA gets programmed to work that way.