Painful pimples. Help!

I'm 5W6D and this morning I woke up with a few hard and painful pimples in and around my hairline in my face. They are hard and they hurt. Some puss came out of them after a few hours. What can I do to prevent them?