You both need to see a doctor and get tested for STDs. Sex shouldn't hurt. If you're female, lube is probably the most important factor, but also taking things slow and getting enough foreplay should help keep things from getting over stretched.
you should post this in the STD forum. are you a male? Burning while urinating and a yellow discharge are symptoms of an STD. These symptoms occur about 5 days after exposure. You must be seen by a doctor and tested to see what this is.