Is the median always in the exact middle of a boxplot?
Not necessarily: the band inside the box will always be the median, but it may or may not fall exactly within the middle of the box.
While the median is that thick line within the box. The box in a box plot shows you the interquartile range , meaning data falling between the first and third quartile. If the data is skewed, the median will not be exactly in the middle of the IQR.
Check out this example in the image below:
The medians can be found throughout the boxes because of how each set of data is distributed. Outliers will make a difference.
Check out this good resource on how to read a box and whiskers plot (also known as a box plot).