Trains from the main station in Aarhus are run by the companies Arriva and DSB. You may find information on tickets, itineraries, and timetables on their websites:

You may buy tickets at the train station, online, or pay at the station by scanning your Rejsekort. 

It is not possible to buy tickets on board the train. 

Always remember to have a valid ticket with you to avoid getting fined during ticket inspection.