The Buddha spoke about the middle way. Sometimes it meant the middle way between self-mortification and sensual indulgence. Sometimes “the middle way” was used to describe avoidance of fixed views, for example, eternalism and nihilism.
With acknowledgement to Patrick Kearney, one of my teachers, I confidently state that the middle way does NOT represent “splitting the difference” between two options; it is not the same as compromise.
The middle way is a matter of direct experience rather than philosophical positioning. If we are balanced entirely in this moment, not leaning towards the past or the future, then there is nothing to cling to and nothing to identify with.
Thus have I heard. At one time the Blessed One was dwelling at Bārāṇasī in the Deer Park at Isipatana. There the Blessed One addressed the bhikkhus of the group of five thus: “Bhikkhus, these two extremes should not be followed by one gone forth (into the homeless life). What two? That which is this pursuit of sensual happiness in sense pleasures, which is low, vulgar, the way of the ordinary person, ignoble, not connected to the goal; and that which is this pursuit of self-mortification, which is painful, ignoble, not connected to the goal. Bhikkhus, without veering towards either of these two extremes, the One Attuned to Reality has awakened to the middle way, which gives rise to vision, which gives rise to knowledge, which leads to peace, to higher knowledge, to full awakening, to Nibbāna.
“And what, bhikkhus, is that middle way awakened to by the One Attuned to Reality which gives rise to vision, which gives rise to knowledge, which leads to peace, to higher knowledge, to full awakening, to Nibbāna? It is just this Noble Eight-factored Path, that is to say, right view, right resolve, right speech, right action, right livelihood, right effort, right mindfulness, right mental unification. This, bhikkhus, is that middle way awakened to by the One Attuned to Reality, which gives rise to vision, which gives rise to knowledge, which leads to peace, to higher knowledge, to full awakening, to Nibbāna.
– from SN 56.11, translated by Peter Harvey (http://www.accesstoinsight.org/tipitaka/sn/sn56/sn56.011.harv.html)
So the real answer to the question “What is the middle way?” is “The Buddha’s Eight-fold Path”, which summarizes the Buddha’s instructions for us. The 8-fold path is not a fixed place; it’s a framework for reflecting, speaking and acting. If we make use of it, even in a beginner’s way, we are less likely to fall into the traps of sensual indulgence or self-mortification. We have a way of protecting ourselves from harmful views and unwholesome habits. The path supports our efforts to find balance, to whatever degree we follow it.