Maimonides says:
However, all the matters mentioned by the Babylonian Talmud are incumbent on the entire Jewish people to follow. We must compel each and every city and each country to accept all the customs that were put into practice by the Sages of the Talmud, to pass decrees paralleling their decrees, and to observe their ordinances, since all the matters in the Babylonian Talmud were accepted by the entire Jewish people.
So according to my understanding, Maimonides says we should observe whatever the Talmud says. Yet we don't act upon every opinion found within the Talmud. So how do we determine which opinions are authoritative or not? And how do we know which opinions are accepted or rejected, and what to act upon or what not to act upon?