Question for the "Racing Experts"

Does someone know how the sectors (for timing) on the track are determined irl?
Is the track simply split into sections or is there some math/logic/whatever involved?

For F1 it seems its simply splitted into 3 parts looking at this image