There are several night trains each day from and to Hanoi (about 9h, ca. 20$ for a soft sleeper depending on the train).
Buses run from Kunming and other cities in Yunnan (China) to Hekou from where it is a short walk over the border to Lao Cai. The border is open from 8am to 11pm (7am to 10pm Chinese time). Crossing the border is pretty easy and fast. Just be carefull on vietnamese side of the border you might be asked to fill in some 'health form', exchange money, book a taxi, etc... by people who seems to be immigration workers. This is scam, you will loose much money if you agree. Dont give them any bribes and dont use their services. Just ignore them, get your entry stamp and leave the immigration post building. There is a 2 km to the bus/train station, 30000 dong by car taxi.
Trains run from Hanoi to Lao Cai. One train starts about 6 am and arrives about 6 pm. There's a simple restaurant in the train. People are selling food through the windows or walking through the train during stops around lunch time. There are 220 Volt / 50 Hz power outlets in the soft seat coaches.
Everything you will see is either water or land. The place is a dry old mainland.
There are a couple of ATMs in Lao Cai. The Techcom Bank has ATMs on the square of the train station as well as close to the border. However, they accept only some international cards. There is one ATM accepting all international cards but it's neither close to the border nor to the railway station. Motorbike drivers usually know it and will drive you there (one-way 10'000d)
As soon as you leave the immigration building you will be approached by money changers. They usually offer poorer exchange rates than the bank. There are two banks just next to the border and a third one just at the other end of the first bridge, though these are all annoyingly closed at weekends. Banks in Hanoi will also readily exchange your RMB for Dongs.
You can get free wifi near bus/train station at the Fansipang restaurant and Le Bordeaux restaurant, both are visible from station.
Lao Cai does have both, public bus, and train station - together they constitute the center of town. While the train station can be found right next to the main road, the bus station is situated around 300m south-west of it, down Phan Đình Phùng. Additionally, mini buses are abundant (destinations usually indicated behind wind shield), which will drive around town until full and can be flagged down - prices are fixed but conductors usually try their luck and ask for more, including mock tickets with fake prices.
Trains run from the train station in Lao Cai to Hanoi - with the option of an overnight sleeper. This will however put you in Hanoi rather early with the only company being a million motorcycle and taxi touts. So its generally a good idea to have a plan as to where you will be heading to on arrival to avoid being scammed. Prices for a soft sleeper ticket are around 300,000 dong, lower classes are cheaper. Check http://www.seat61.com/Vietnam.htm for up to date information on prices.
Train Company - Livitrans
There is also a bus service to Hanoi costing 89'000 dong.
Night bus to Hanoi. Costs about 150000 dongs. Very uncomfortable with loud music and no leg space. Train is much better option, but often need to be booked in advance.
Minibuses run from outside the chinese Hekou border immigration exit, and train station straight up the mountain. Cost should be 25,000d per person and the bus leaves only when it is full. As of March 2012 there does not seem to be a bus from the public bus station to Sapa.
If arriving via the chinese Hekou border, watch out for touts who will persistently attempt to get you to pay anything up to 150'000d, or ¥20 (approx 50'000d) per person to get to Sapa. Just ignore them and walk to a main street and flag a minibus with a sign showing Sa Pa at the windscreen. Confirm with the driver or bus attendant 25'000d and hop into the minibus to Sapa.
If arriving by train (usually at around 5am - 6am) watch out for minibus scams asking for 200,000 dong upwards. Generally they can still be bargained down (despite much disgust from whoever is so kindly scamming you).
Bac Ha, with it's Sunday market, can be reached via public bus in around two hours for 70'000VND.
About 40min walk from bus/train station, is the border crossing to Hekou in China. Border office is a big building next to a bridge, opposite Sapaly hotel / Biti's trade center. From here you can catch an onward bus through to Kunming for around Y120.
I paid Y 146 from Kunming to Hekou today 06.01.14