The median sales price is the price literally in the middle if you line up all prices from lowest to highest. So, for example, let's say you have the prices 1,1,2,2,2,3,4,5,5,6,10. If you look for the middle number in the line, that's your median. In this example, there are 11 numbers. The number right in the middle of the line is 3 (1,1,2,2,2 are to the left of this and 4,5,5,6,10 are to the right), so 3 is the median price. There's really no calculation in median price-it's just lining up the numbers and finding the middle.
With average, you add up all the numbers, divide that number by the amount of numbers in your sequence, and you get the average. In the example above, you take 1+1+2+2+2+3+4+5+5+6+10=41. Divide 41 by the amount of numbers in the sequence, which is 11 (41/11), which equals 3.73. So 3.73 is your average.