Budapest Ferihegy Airport is relatively close to the city centre. Terminal 1 is used by most low-cost airlines. Terminal 2A and 2B serve Schengen and non-Schengen flights respectively.
The easiest option is to hop on the 200E bus which drops you off at Kőbánya-Kispest metro station. A ticket costs 320 Ft at newspaper vendors and 400 Ft on the bus.
Alternatively, you can get the MÁV suburban railway from Ferihegy station near Terminal 1 to Nyugati station in Budapest. A single ticket costs 365 HUF.
Another alternative is the airport shuttle bus, a good option if you arrive in the middle of the night.
And to get a taxi, avoid surprises by ordering a Zóna Taxi from the ticket office in the airport. The journey costs about 5200 Ft (€24) to the city centre, and 4000 Ft (€18) to the airport.