If you're gonna build him AP you pretty much just go something like Nashor's, boots, Sheen, Sorc shoes, Lichbane, Dcap/Zhonya's/Void Staff, whatever order you need them in.
Once you have a Nashor's and a Lichbane the damage is real, and then you just want to stack AP. That's pretty much it.
If you meant masteries and runes, just hybrid pen reds, hp or armor(or half/half) yellows, flat MR or MR/lvl or 5% CDR blues+MR/lvl(whichever you prefer), and either AP or AD or 2x AS quints. Masteries are more or less similar to Akali, something like 27/0/3. You get all of the AP and AD masteries, and take the 5% AP and don't take the 5% AD.
You aren't actually AP in the really early game because you need items, so you just play like you're AD while you farm until you start getting parts for a Nashor's. I'd still start Doran's Blade and buy another blade if you have to back early, just because until you actually have a Nashor's the AD is going to be more useful. But once you have a Nashor's the AP actually converts to AA damage pretty well.
The best time to actually play it is if you're on a team that ends up being all AD, because the enemy team is going to be more inclined to get armor first which lets you do a lot of damage. Just don't build him AP if you have a Fiddle Jungle and a Ahri mid, because your team isn't going to have physical damage and you'll get rekt
Varus has a hard time regardless of what you build him because he's so immobile and he doesn't actually have a slow added to his AA's like Ashe. You have to be really careful with your positioning.