Stopping diarrhea


So I’m on bc and I had diarrhea 4 hrs after I took it and since then I’m still having diarrhea. Can anyone tell me how to to stop diarrhea? I already drank pepto this morning but I’ve been still getting diarrhea and I haven’t eaten anything today. Also am I still protected if I had sex 2 days in a row this week?