If you have one wire into your switch box for your light. this is called a switch leg, the dimmer should be wired across the black and white wire wires.
Install the switch in the wall outlet box you have installed. Now run a 12/2 or 14/2 wire from the switch to the light fixture in the ceiling. Run the exact same size wire that is already powering the light. Connect the ground wire coming from the light switch to the ground wires in the ceiling box. At the light in the ceiling cut the black wire powering the light. Cut only that wire. Now strip the 2 black wires back and connect the white wire coming from the wall switch to one of the black wires and the black wire coming from the wall switch to the other black wire. At the wall switch connect the ground wire to the ground screw on the single pole switch. Now connect the white and black wire to either screw. Does not matter which one. Now when you turn the switch off you are breaking the flow of electricity to the light. This is called a switch leg.
Are you sure its not a ground wire?
There isn't, unless you have a damaged switch.
Yes, to the green ground screw usually.
Run a wire from the light to the switch. At the light connect the black power wire to the black wire to the switch. Not wrap some black electric tape at each end of the white wire going to the switch (This indicates that the wire is potentially hot and not a common wire). At the switch connect the black wire to one side of the switch and the taped wire to the other side of the switch. Connect the ground (bare) wire to the green screw on the switch. Now at the light connect the taped white wire to the black wire feeding the light and connect all grounds together with a wirenut.
You have a 3 way switch. Your black wire is the hot wire. Your green wire is the ground wire. Your red and white wires go to the light and other switch. You should have gotten a wiring diagram with your switch.
In a properly wired switch, you should find a bare ground wire of copper. Using a DVM or voltmeter, measure the voltage between the ground wire and both wires attached to the switch. One should be hot or at 120 volts. The other wire will lead to the device the switch turns on or off. If there is no ground wire, you can run a temporary wire from a earth or pipe ground to get a measurement.
You put switch in series with the black supply wire and the black wire to the first light. Then connect black wire of first light to black wire of second light, black wire of second light to third light and so forth. Do the same with the white wires and ground wires.
A single pole switch would have a hot wire from the source, a switch leg going to the load, and a ground wire to ground the switch for your safety.
If I am correct I think you are wanting to know how to connect a 3 way switch where you can turn off an light at 2 locations. At one switch you run a 12/2 wire from the switch to the light. There is no power at this switch. At the other switch you have your a power input wire. Run a 12/3 wire from one switch to the other. Connect all the whites together and shove them back in the box at the switch with the wire going to the light. At the switch with the 12/2 wire going to the light, connect the black 12/2 wire coming from the light to the black screw on the 3way switch. Now connect the red wire and black wire from the wire you ran between the switches to the other 2 screws on the switch. It does not matter which you connect to which screws. Connect the ground wire and put that switch in the wall with the cover on it. Now move the the other 3way switch with the power wire. Again connect all the whites together and shove them back in the box. Connect the black wire from the power source to the black screw on the switch. Now connect the other 2 wires left, black & red to the other 2 screws that are left. Again it matters not which wire you connect to which 2 screws that are left. Connect your ground wire and put the switch in the wall a cover on. At the light connect the black to black and white to white. Connect the ground wire to the green or ground wire on the light. You are done.
A light switch wiring is simple. You just need to contend with three wires. For typical home wiring you would have a hot wire (black), a neutral wire (white) and a ground wire (bare or green). You switch only the hot wire. The hot wire from the supply side is connected to one terminal of the switch. Connect the hot wire for the load to the other side of the switch. Connect the white wires together with a wirenut. The ground wire is connected to the ground terminal of the switch. This is often connected to the supply and load grounds via a pigtail wire and a wirenut connecting three wires together.