Some mens precum can contain sperm. If you recently masturbated or had sex there is a higher possiblity of sperm in the precum. There have been studies shown that if you get sperm on a women and it makes it way to the vaginal opening it can cause pregnancy but its a lot harder.
Lets say she was wet and you touched her panties with precum on your hand. Then the panties rubbed up against her and the precum with the sperm went into her and traveled up to the egg. Once the egg is fertilized she is now pregnant and you didnt have to have sexual intercourse to conceive.
My suggestion is to wear condoms to help prevent unwanted pregnancy.
It is possible to get pregnant if you touched yourself then touched her but it would be very difficult and very unlikely.