In simple terms you are taking off at less than the Performance Limited takeoff mass.
You have more runway or climb performance than you need.
You work backward through the performance charts to determine the temperature you can meet all of the required these requirements at.
That is the flex temp.
Otherwise you put in the performance computer and it does it for you.
W1