The eightfold path is a moral compass and guide to your behavior that can lead to the right path and thoughts.
The Eightfold Path of Enlightenment;
Just as there are many forms of Christianity, with Jesus as the common denominator, so are there many forms of Buddhism with the four noble truths uniting all Buddhists.
This contemplative way of spiritually being and perceptive seeing is personified in the Four Noble Truths.
They are that; life is full of suffering, that most of the suffering, including the fear of death, can be traced to “desire,” and the mind’s habit of seeing everything through the prism of the self. If you continually base your life on desires, you’re longing for wealth, fame, status, children, power, and immortality, then life is unceasingly painful. That this craving engendered by separate selfhood can be transformed and free you from attachment to desires, leading to peace and enlightenment through the transcendence of self to the exalted state called Nirvana or Satori (awakening) and that the means to do it lies in The Eightfold Path to Enlightenment.