Seven runners finish a race in 21, 22, 22, 24, 25, 27 and 40 minutes. The runner in fourth place, with three faster and three slower, finished in 24 minutes: that is the median. Now suppose the last runner took 90 minutes instead of 40. The order is the same, the fourth runner is the same, and the median is still 24. The mean, by contrast, jumps from about 25.9 to 33 minutes. The median cares about position, not about how far the end values reach.
With an even count there is no single middle runner. For 10, 12, 14, 20 the position formula gives 24+1=2.5, halfway between the 2nd and 3rd values, so the median is 212+14=13. The formula tells you where to look in the sorted list; the median is the value you find there.
What looks like a median but is not: the middle entry of an unsorted list. In 7, 2, 9 the number in the middle spot is 2, but sorted the list reads 2, 7, 9 and the median is 7. If you never put the numbers in order, you have only found the middle of the way someone happened to write them down.
Think of it like this. The median is the student standing in the middle of a height line-up. Swap the tallest student for a basketball player and the middle student does not change. With an even number of students there is no middle person, so the median sits halfway between the two in the middle.
Core idea. Sort the data and the median is the value standing in the exact middle, with half below and half above.