The first and last terms of a proportion are called extremes. It was named so because the word 'extremes' is derived from a latin word meaning outermost. On the other hand, the terms inside the proportion are called means because the latin word where 'means' originated means middle.
Simply put, extremes are just the terms outside the proportion and means are the terms inside or in the middle.