What is going on

I'm pregnant, probably about 2-3 weeks along. I woke up this morning and I had brown discharge and now I have cramps and sharp pains. What's happening?