As already mentioned, transport infrastructure outside Baku goes rapidly downhill. Accordingly, if you really want to explore and visit the villages, you'll probably need a 4 wheel drive. Azerbaijan is a great place to brush up your driving skills! There are taxi's and buses to be found in most parts of the country but be prepared to use Russian, Turkish or Azeri as the level of knowledge of other languages is very low.
Baku Metro is to be seen to be believed. I've heard many stories about how Moscow Metro is amazing and Baku is definately up there with Moscow.
To ride the metro, you need to pay only 14 pence and you can ride to as many stations as you wish. Each one with their own little masterpiece. Nizami Station is definately worth a visit, as it contains a mosaic of Nizami, one of Azerbaijan's most famous poets.
The only thing to remember is watch your belongings, as trains can often be crowded.
Most touristic places in the centre of Baku are in walking distance but the Metro is very easy to use. Just buy a coin and take the escalator down to the platform, it is very cheap and there are frequent departures. Like everywhere in the former Soviet Union the stations are huge and very nice decorated.
You can always catch a bus full of sweaty people, but you'd rather not. However, there are two options to take, subway and a taxi. Subways are fast and reliable, and they are a great way to view an old styled subway for those of you who are traveling for the first time. However, the most reliable and fast transportation is catching a taxi, and did I mention quiet a few of them. There will not be a moment or a second where you will not come across seeing a taxi. They are everywhere! And they are cheap! No meters and no price range. One can make up its own price range. For instance, $3 or more. I guarantee you that it is the best transportation available in town.
I think the best way (easiest way) to get to Baku is by airplane.
The best way to see the city is by walking. Taxi driver's rarely speaks english, and they sometimes get lost while driving in the city.
I arrived in and left Baki by rail. There are nightly trains to Tbilisi in Georgia, taking about 18 hours, depending on the mood of the border guards. Trains are excruciatingly slow, but comfortable and cheap, and because the border is crossed either mid-morning (going to Tbilisi) or early-evening (heading to Baki), you can get a very good nights sleep. Of course, this depends on how much vodka your fellow passengers have drunk! Border guards take a special interest in foreigners, not always in a good sense...they will be after bribes, and failing money, they might ask for 'presents'...be wary of 'official fees' and demand a receipt for any payment. Don't pay anything if the guard lowers the price 'just for you'...obviously this is NOT an official fee, and will most likely go towards cigarettes and alcohol. A good way to get away without paying a bribe is to show them a credit card or some travellers' cheques...don't let on that you have dollars. It is better to make sure that you are not in a compartment all to yourself, as local passengers often stick up for foreigners where bribes are involved...of course it could also work the other way around! If you are alone in a compartment, like I was, don't let the guard close the door on you...my guard made it quite clear that he wanted money or a suitable gift from me, and when I refused, he closed the door...I made a fuss and enough noise to alert the provodnik (train attendant) who came along to see what was going on...the border guard almost immediately gave up on me, shook my hand and left! Another good tactic is to speak at them in a language they don't understand, until they get bored and leave, or to offer them things that won't be useful to them...I offered a bag of dirty underwear, which did not go down well!!! The Azeri guards were rather half-hearted about asking for bribes...one 'No!' was enough. But the Georgian side was much worse. A local passenger told me that the trains are only obliged to stop for two hours at the most, after which time the drivers are free to decide when the train leaves. If you have a difficult guard, try to hold out until the train starts moving, then they will have no choice but to leave, bribe-less. This only applies to those who do have their paperwork in order...don't expect to get away with not paying anything if you don't have the correct visa, but if you are sure your visa is valid, don't be afraid to stand up for yourself.
For getting around Baki, my favourite method was walking...I walked everywhere, despite the heat and the hazardous driving skills. It is a flat city, so it is a city made to be walked in! However, taxis are cheap, and there is a network of minibuses with their destinations listed on the side...you can stop them and get off them at any point on their route by shouting 'Sakhla burada!'. As for getting to other towns in Azerbaijan, the fastest way is by bus. There are two bus stations, the main one for international buses and destinations around Azerbaijan, and a second, more chaotic bus station for towns on the Aspheron Peninsula. Some of the nearer towns are served by the city minibuses as well. Distances in Azerbaijan aren't huge, but some of the buses are so clapped-out (I swear some of them run on vodka!!) that it can take hours to cross the country...for example, Baki-Zaqatala is an overnight journey (don't expect to sleep though...you will have no leg-room, and just as you drop off, the bus driver will decide to take a cigarette break, and everyone will make a lot of noise getting off to join him!), and Baki-Quba is four hours.
The best way to get to Baku is by air. I flew round trip from the US for about $1100.00. KLM northwest used to have a non stop flight to Amsterdam (great airport) and then there is a non stop to Baku.
Probably the best way to get around is walking. I took cabs late at night, but be forwarned, pedestrians do not have the right of way in Baku, drivers do. I avoided buses and the subway (although I am told this is pretty safe).