While the other major Game of Thrones characters have been preparing themselves for the danger that lies ahead of them, Sam has been at the Citadel all season, studying to become maester of the Night's Watch. But he appears to have a change of heart in the fifth episode, when he packs up and leaves the Citadel, citing that he's "tired of reading about the accomplishments of better men." His parting words probably rang familiar for some people, as that line was actually a callback to something his father, Randyll Tarly — one of two casualties in the latest episode — once told him.
Back in season six, in a scene that it still hurts to watch, Sam's father rips into him not only because he returns from Castle Black with Gilly, a wildling girl, but also because of his decision to journey to the Citadel to study to become a maester. Randyll holds nothing back as he expresses his disappointment in Sam, calling him a coward and practically disowning him because of how much Sam's choices differ from those of his father and brother.
Though spending time at the Citadel sounds like a less-than-heroic storyline, it should be noted that, despite what his father makes of it in season six, Sam's time in Oldtown is way more important to the overall storyline. His main reason for studying to become a grand maester is so that he can read up on more information about the White Walkers as they slowly make their way past the Wall — and there's definitely not a better place for him to do that than a giant library.
Though the maesters at the Citadel weren't exactly very helpful during his quest for knowledge, hopefully Sam's decision to leave doesn't deter him from what he came to do there in the first place. It'd be sad to see him actually discourage himself and believe his father's harsh words.