It is said that only the Buddha, a fully awakened one, knows everything. I'm not sure if there's a name for that wisdom. So the Buddha got that wisdom and used (all-knowing-wisdom) to see the eight noble paths and attained nirvana or is it the other way round?
There are some differences of opinion between the different schools on this kind of thing. First of all, the Theravada school doesn't accept the idea that the Buddha has knowledge of everything (which Mahayana schools tend to teach) but instead teach that the Buddha possesses unobstructed knowledge and vision, meaning that the Buddha had the ability to find an answer to any question given time and effort, and even the precise meaning of this isn't quite clear. Confusingly, the term "unobstructed knowledge and vision" is sometimes translated as omniscience.
This unobstructed knowledge and vision is the result of having cultivated the ten Paramis of generosity, morality, renunciation, wisdom, energy, patience, honesty, determination, goodwill, and equanimity to perfection as a Bodhisatta, and when he attained Arahatship on the night of the full moon in the month Vesakha, the cultivation of these Paramis came to fruit and he obtained unobstructed knowledge and vision.
He attained Arahatship that night by means of the Noble Eightfold Path, just like everyone else, and according to the Pali Suttas, he did so by means of Anapanasati.
The Drikung Kagyu Buddhist (Tibetan) has the answer I most think I understand. Each sentient being has "Buddha Nature", like gold undiscovered underground. When the "dross" or accumulated defilements that cause samsara are removed, only the "gold" or enlightenment remains. This unpolluted nature (sometimes called the "natural" nature) is "nirvana". Another analogy is like a glass of dirty water. When the dirt in a glass of water settles, the pure water allows a pure view. The teachings, such as the eight noble paths, etc., are "skillful means" of bringing beings to liberation (understanding the their buddha nature, etc.) in this realm. In other realms, other teachings might be used. (One sutra in Tibetan Buddhism, whose name I do not recall, notes that beings in another realm were being taught by a local bodhisattva through the sense of smell, rather than the sense of sight and hearing, as most teachings are in this realm. Hope that helps.
Samsara is the reiteration of our birth. Our birth either as a human or an animal is a suffering.Nirvana is ending our birth . Gautham Buddha ended his birth.Every pleasure and attachment is a suffering . At the end of the day everything decay and pass away.All our actions have a reaction .Even our thought is a karma which eventually carries its reaction. Bigger part of our life in any birth is the result of our karma . Now one may think that attaining merits through meritorious deeds and attaining a luxurious good birth is the end.Even though it is reasonable that it is advantageous to attain a human birth with wealth in order to collect merits , one must attain the nirvana by ending birth.