It is now possible to buy tickets for travel on Polish regional trains which is useful as queues at ticket offices are often lengthy and ticket machines are few and far between.
Tickets can bought through the Przewozy Regionalne website, which you need to register on to make purchases (see how to register):
https://www.biletyregionalne.pl/login