To travel longer distances you can choose between buses and trains.
Buses
If you want to travel outside of Budapest by bus, you can choose the Volán buses that are usually white or yellow.
The prices of tickets and the intercity supplementary tickets are calculated on the basis of the number of kilometres underlying the establishment of the fare calculated on the basis of the number of kilometres as per the timetable. You can also buy season passes (30-day, half-month).
It is not compulsory to buy tickets in advance, it is possible to buy from the bus driver as well. For longer routes it is recommended to buy your ticket in advance because on some routes the bus can be fully booked. Bus tickets don’t have to be validated, but you need to show them to the bus driver when you get on the bus.
Trains
If you travel by train, you have to be careful about the train station because Budapest doesn’t have a main station, but 4 different ones: Budapest-Nyugati (West), Budapest-Keleti (East), Budapest-Déli (South) and Budapest-Kelenföld (name of a district). You can plan your journey and buy your tickets on the Máv website (you can change the website’s language to English). However, if you don’t want to buy your ticket online, you can buy it from a machine or in ticket offices in the station. It is only possible to buy a ticket on the train if you board the train on a small station and the ticket office was closed there. Otherwise if you don’t buy a ticket in advance you will receive a fine from the conductor. Train tickets don’t have to be validated, an inspector will validate them for you on the train.
The price of the ticket depends on the distance, the journey and concessions offered. 1st and 2nd class tickets are available; however, there is not a 1st class car on every train. MÁV-START charges supplementary charges on top of the price of the ticket on numerous long distance services, such as a rapid train supplement, seat reservation or supplement and seat reservation. Both the ticket and the supplement ticket must be presented to travel on these trains (generally, semi-fast trains, fast trains, express trains, InterCity, EuroCity, EuroNight, Railjet). Information on trains running along the planned route in which case supplementary charges are charged is available at ticket offices, while the supplementary charge that must be paid to travel on the selected train is automatically charged when the ticket is purchased from a vending machine or online. The supplementary charge may vary based on the distance, the selected line, the time of travel and the date of purchase.
You can buy your tickets and check the timetable of the trains on the MÁV website.
Travel discounts of trains and buses for foreigners
MÁV has collected its discounts for foreign nationals.
Children below 6 years old can travel for free, children between 6-14 years old are eligible for a 50% discount, youngsters below 26 years old are eligible for 33% discount on weekends and there are family discounts for 1 or 2 parents if traveling with at least 1 children (33%) or with at least 3 children (90%). Be aware that some other discounts are only applicable for residence of the European Economic Area (e.g. only European Economic Area student cards are accepted, and only European Economic Area residents can travel for free above 65 years old).
One correction has to be made on the above table, because based on our experiences if you study in Hungary and have a valid Hungarian student card, you can travel with a 50% discount on buses and trains in Hungary even if you are not an EU national.
Source: https://www.mavcsoport.hu/en/mav-start/domestic-travels/faq-domestic-travel
Ticket discounts for buses: https://www.volanbusz.hu/en/travel-information/buying-ticket/domestic-fares#3.1
Trip planner for trains and buses outside of Budapest
You can use the MÁV and Volanbusz website or application to check the timetables, or you can use the menetrendek.hu website that can provide you all the bus and train options as well.