The frets are laid out using some fairly simple math. It is called the rule of 18. You take the scale length and divide by 17.817 if I recall. 17.817 is some math constant. The resulting number is the distance from the nut to the first fret. Then you subtract that calculated distance from the scale length and repeat with the resulting new number. This continues for the number of frets you want to calculate. There are fret calculators online where you plug in the number and the computer does the math for you.