If you have a permit in hand, you can buy tickets from a train station; there are signs in many stations notifying foreigners that they need to show a permit before buying a ticket to Tibet.
But as noted above, there's great demand for these tickets, and corruption in the process, so the advice that "you can buy tickets from a train station" really means that you can buy them only on the off-chance that they're available. They may be -- asking at the ticket window costs nothing -- but don't count very heavily on it.