How do I wire up a 4-wire dimmer switch when I only have two 2 wires from the wall?
Not sure what make and model dimmer you're trying to install, so I'll describe a common installation. Wire colors could vary, depending on manufacturer. 


Black is the common terminal, and is attached to the ungrounded (hot) conductor feeding the switch. 
Red is the switched lead (or a traveler in a 3-way installation), and is attached to the switched hot going to the light. 
Red with white is a traveler, used for 3-way installations. In your situation, you'll just cap this one off. 
Green is ground,  and is attached to the grounding conductor. 



From Lutron Luméa® Installation Guide

If you don't have grounding conductors in your home, you could install a GFCI breaker and you'll be code compliant.  

Lutron devices typically have a red and a red/white stripped wire, whereas Leviton has two red wires.