In the lobby of the train station there is always plenty of room for different stuff: ticket machines, turnstiles to check tickets, usually also a coffee shop and newsagent.
In that space you will find a big screen that lists the next departures and arrivals. It shows the time of departure, the destination, the platform and sometimes a small list of stops.
In big train stations like Barcelona Sants the track number is usually unknown until say 10 minutes ago, because it may change depending on the traffic. However, they always follow some logic and lines are clustered in the same range of numbers, so you just have to reach the correct platform and it will be a matter of knowing if it comes to the right or to the left.
In small train stations, there normally is just one way: one side to go to Barcelona and the other side to go in the other direction.
And in case of doubt, just ask locals, they always know :)