Cold sores are caused either by Herpes Simplex Virus 1 or 2 (HSV1 or HSV2) which cause herpetic lesions (or ulcers.) While you have an active infection, the virus can easily be transmitted to another person's mucus membranes through kissing or oral-genital contact. While you are not having an outbreak, the virus lies dormant in the nerve ganglia near the sight of the infection. During these periods of dormancy, there is very little virus present on surface of the mucus membrane (requiring very sensitive PCR based detection assays to quantify.) It seems that it is difficult (though probably not impossible) to transmit the virus during these latent phases. Compounding the problem is the fact that as many as half of persons infected with HSV1 or HSV2 will never become symptomatic or even know that they have contracted the virus. In addition, there are very few good studies on the transmission of HSV during the latent phase.
That being said, persons who have recurrent herpes outbreaks often report being able to tell that they are going to have an outbreak before herpetic lesions appear. During these times, it seems the virus is actively replicating and moving through the nerve ganglia towards the mucus membrane surface and can be easily transmitted.
If you have a partner that has herpes, antiviral drugs such as acyclovir or valcyclovir (valtrex) may reduce the risk of transmission. There are also studies where acyclovir or its derivatives have been used as a prophylactic to prevent herpes infection in non-infected individuals. Condoms are NOT nearly 100% effective in preventing herpes transmission although they associate with a lower relative risk of infection.
If you want further explanation of any of this material or have any other questions, let me know.