"Flow is being completely involved in an activity for its own sake. The ego falls away. Time flies. Every action, movement, and thought follows inevitably from the previous one, like playing jazz."
In his book Flow, Mihaly Csikszentmihalyi, psychology professor and specialist on happiness and creativity, discusses the importance of optimizing inner experiences to make life feel meaningful and worthwhile. The optimal state is that place where one is immersed and present, enjoying whatever is, moving along completely at ease and without regard for results.
This state of flow that can lead to peak performance has been described similarly by many around the world through the ages, and is what we are inspired by when we see it in people like spiritual sages, great athletes, and artists.
It is a similar internal space as a child absorbed in play.
There is no set recipe to get to this state, we each must find our way.