The closest big city to Lofoten is Bodø, which is the typical starting point for a trip to Lofoten. Both Norwegian and SAS fly to Bodø. You can also travel quite cheaply from Oslo to Bodø by train. If you book well in advance you can find options as low as 199 NOK, but the train ride takes about 17 hours with a change in Trondheim.
The most affordable way of traveling throughout the area is to buy the Travel Pass Nordland. For 990 NOK you can travel as much as you want for seven days within Nordland county. This includes all of Lofoten and Bodø. The pass is valid on buses and express boats (excluding car ferries).
From Bodø you can travel by plane to Leknes or Svolvær. But you might be better off traveling by boat to Moskenes or Svolvær, as plane travel can be pricey and taking the boat is an adventure in itself. Note that you cannot use the Travel Pass Nordland on this car ferry, but the price for a single person is only 212 NOK. Traveling by bus or car from Bodø to Lofoten is a long drive unless you take a ferry, so avoid that unless you have lots of time to spend.
For moving around Lofoten the best option is the “Lofotenekspressen” bus line which travels all the way from Å to Narvik. There are usually two buses going each way every day, but make sure to check the timetable. There are also many local bus routes around Lofoten. Be sure to check their timetables in advance as many of them are one operated once per day.
Cycling is also a very good option if you want to slowly digest the lovely scenery. On the contrary to what most people think, cycling around Lofoten is very flat and easy. You can rent a bike in Svolvær or Reine. To avoid biking through the Nappstraum undersea tunnel, take the boat going from Nusfjord to Ballstad. The boat leaves daily at 11 am from Ballstad and 12 noon from Nusfjord between 15th of June and 15th of August. You need to book a day in advance by calling +47 47 81 77 73.