The town of Hekou is within walking distance of the border post, and Lao Cai is just across the bridge. The border is open 8AM-11PM (7AM-10PM Vietnamese time).
Buses run from various destinations within Yunnan, including Kunming (¥140, 6 hours, 9:40, 10:40, 12:40, 19:00, 19:30, 20:00). Some connections, including Jinghong require you to change buses in Mengzi. Bear in mind that the bus may not take you all the way into Hekou, but might stop at a point West of town. It's about an hour's walk from here to the border post, along the Honghe river. Or, you could take a taxi (there are usually some waiting) for around ¥10.
Beware of helpful guys speaking English at the bus station, offer to sell bus/train tickets in Vietnam for triple their real price or exchange currency several times more expensive than in respectable places. Check prices and exchange rates in advance. Tickets can be bought easily at Vietnam side of border.
Vietnam - Night bus to Hanoi from Lao Cai. Costs about 350,000 dong. Very uncomfortable with loud music and no leg space. Train is much better option, but often need to be booked in advance.
Kunming: First bus is at 8h45, next 10h50 and 1pm, cost about 140 cny. It takes about 7-8h to arrive to Kunming Eastern bus station. Take bus 60 (2 cny) to reach town center / railway station. The bus station is about 3 km from the border to Vietnam.