Here is a pic from one of my installs:
Plug 1: OEM Wiring Harness
Plug 2-3: Is an adapter harness normally connected to the HID bulb by the rubber grommet.
Plug 4-5: Is a relay harness to switch power from the battery instead of through the factory wiring harness
Plug 6: HID Ballast input
Plug 7: HID Ballast output to HID light bulb
Examples: (Assuming the HID kit is using a 9006 plug at points 4,5,6. Which they normally do)
For the low beams using a 9006 factory style bulb and connector. You could plug 1 into 6 and get power to the HID system. This draws power from the factory wiring harness. I don't recommend this.
For the low beams using a 9006 factory style bulb and connector. You could plug 1 into 4 and 5 into 6 and get power to the HID system. This draws power from the battery using the relay harness. Note, the two ring terminals of the relay need to be connected to + and - respectively to work.
For a foglight setup, it'll connect similar as the above examples. You may need something to connect the factory harness at point 1 into point 4 or 6 (depending if you use a relay harness or not) Most kits supply that harness from point 2-3 attached to the HID bulb in the kit. Otherwise, using a relay harness you can cut plug 1 off and plug 4 off and hardwire.
Good luck! HIDs are usually a very simple install.