The Chacham must first know the "borders" of the halacha to determine what is permitted or forbidden. In cases of doubt, the Chacham may rule according to the clalim; a major one being that in cases of doubt regarding a Torah law, be stringent, while in cases of Rabbinic law, be lenient. These clalim serve as keys to learning the final ruling in most sugyas and were taught by Ravina and Rav Ashi, the redactors of the Talmud Bavli.
To further clarify, the Chacham may learn how the Rishonim understood or learned the final ruling of the Gemara and make his way towards the Acharonim to further strengthen his own conclusion or reject it for that of one of their conclusions, if his da'at accepts it.
The fundamental key in paskening is that the Chacham absolutely believes that the conclusion he is holding is the correct ruling and he is able to explain why in a clear and concise manner, without a doubt. The more he is sure, the stronger he will be.
However, most of us nowadays, don't have the yishuv hada'at or harchavat halev to "stand the Din on it's feet", unfortunately, due to the times after the Second Beit Hamikdash; so we rely on the rulings of the Shulchan Aruch and the poskim that came before us to decide halacha l'ma'aseh, generally. Even so, the Chachamim of each generation have the ability from Shamayim to guide the Jewish people through their times. One who doesn't accept this, without having the proper level of scholarship to disagree on issues of halacha, borders on heresy and apikorsut.
So nowadays, almost no one is moreh halacha from the Talmud alone because it requires a high level of peace and scholarship that is almost unavailable due to the times(with the latter being available, baruch HaShem!); you get to halacha l'ma'aseh by having the simple explanation of the Talmud's conclusions and then referring to the Shulchan Aruch and it's commentators, with the fundamental key of believing that the conclusion you are holding is the true one and fits the case at hand, according to the rules of hora'ah.