Merdare border crossing
The Merdare border crossing joins the de facto independent republic of Kosovo (near Prishtina) with Serbia (near Niš). It lies on the E80. Walking across this border is allowed.
There is a café/restaurant on the Kosovo side of the border, which refuses to accept Serbian Dinars! There is wifi in the café with the password being 11111111 (1 eight times). If it's late and you plan on camping it might be better to do it on the Serbian side as there are some forests there, whereas on the Kosovo side there is only open farmland.
If you get a lift to the border it might be worthwhile just crossing the border on foot, as there can be quite a tailback of cars and trucks waiting at the border. You can thumb just after passport control, before the small roadside cafe. If you are going to Prishtina, wait for a direct lift instead of being dropped off somewhere before Prishtina.
If you find it's too dark to hitch then there are sometimes taxis on the Kosovo side which should take you to Podujevë for about five euro from where you can get a bus to Prishtina for relatively cheap.
Crossing from Kosovo into Serbia is generally a longer process. Most importantly, if you've entered Kosovo directly (i.e. from Albania, Macedonia, Montenegro, or by flying) without first entering Serbia you are quite likely to be denied entry to Serbia for having "illegally entered Serbia" (officially Serbia still considers Kosovo to be Serbian territory). The border guards will know because you do not have a Serbian visa stamp in your passport. In this case, the Serbian officers will insist you enter through Montenegro or Macedonia instead.
As experienced in August 2014 by Rdoc101 if you have a European ID card then it is possible to transit into Serbia as there is no need for a passport stamp to exit Serbia. But with just a passport, European or not, it is likely you will be turned around to Montenegro or Macedonia.