Plot fertility is the way the AI scores the value of settling any given plot; human players see this as yellow city icons. Its base value is determined by the sum of all yield values for the given plot as well as the Happiness, Resource, and Strategic value of the plot. In the case of yield values, the AI takes the total amount of each yield available in each ring around the plot and multiplies that value by a ring multiplier (6/3/2 for 1/2/3 tiles away), a yield-specific value multiplier (15/3/1/1/0/1 for Food/Hammers/Gold/Science/Culture/Faith), and a flavor multiplier (values based on the player's flavor values for Growth, Expansion, Production, Wonders, Gold, Tile Improvement, Science, Culture, and Religion). Happiness and Resource values are checked up to 5 tiles away with the ring multipliers of 6/3/2/1/1, a multiplier of 60 and 10, and a weird way of determining actual values that I cannot recall (only that it greatly undervalues happiness from unique luxuries). Strategic value is extremely dumb in the unmodded game: the only thing the AI checks for are hills in a radius of 1 and mountains in a radius of 2, increasing strategic value by a flat amount for each one. If a tile does not have any value besides strategic, ie. it's flat desert, snow, or mountain, it decreases the original plot's fertility value by 30 * (ring multiplier). Tiles owned by another player are not counted, and tiles owned by the current player have their fertility contribution halved. Natural wonders double their fertility contribution and also add an extra 500 fertility.
In the unmodded game, certain civs will get an exorbitant amount of extra flavor for plots in certain areas: Spain gets an extra 55000 fertility when the tile is in 3 radius of a natural wonder, Celts get an extra 1000 * (faith flavor) or 2000 * (faith flavor) fertility for settling next to 1 or 3+ forests, Morocco gets 1000 extra fertility for every desert within city working radius, Brazil gets 1000 extra fertility for every jungle within city working radius, Netherlands gets 2000 extra fertility for every floodplains or marshes within city working radius, Inca gets gets 1000 to 3000 extra fertility for every hills that is adjacent to a mountain depending on how many mountains there are adjacent to the hills, and Iroquois gets 10 extra fertility for every forest within 5 tiles. Indonesia multiplies the fertility value of all plots that would give it a civ-unique luxury by 3.
Once the base fertility of a tile has been determined, the AI then applies a boatload of multipliers based on the tile itself. Fertility is halved if the tile has a visible resource, is increased by 15% if the tile is on a river, is increased by 40% if the tile is coastal and another 40% if the player has 8 or more Naval flavor, and is doubled and increased by 25 if the tile is coastal and the player is flagged as a coastal civ (England, Carthage, Polynesia, etc.). After this come the distance modifiers: basically, the AI checks to see how close its closest city is to the plot and how close the closest enemy city is to the plot and applies modifiers based the results combined with its growth and expansion flavors as well as its boldness value.
After all of these have been calculated, the settler takes the overall fertility values of plots and then reduces their value if they are too far: what constitutes "too far" depends on the map and whether or not the settler is escorted, but everything roughly 12 or more tiles away is usually reduced by the same amount.