arizona98tj has really said all that's needed, but since this is one of my favorite subject I'll babble on some

. The thread he linked also has link to another site, which has detailed instructions I saw a few days AFTER doing mine (timing is everything).
There are only a few adjustable gas blocks, I don't see them often. I know of no S&W M&P15 that comes with one.
You don't mention which exact M&P15 you have. I have the M&P15OR, which came with the simple rectangular "block", gas block with top rail. The rear hole in the bottom contains a set screw (allen head) that is just to backup the pin. While I had the original gas block I had a sling mount stud screw in there also. This has to be loosened to remove the gas block.
On the OR gas block, the pin is most peoples issue. Seems most gas block pins are removed from the other side (they are tapered and only come out one way). If yours is not an OR, and has a different gas block, you may want to call S&W and ask if there are any specifics you need to know before starting. Maybe I'm just lucky with that, but they have always been great answering such questions for me.
Never having removed a gas block myself, I stressed quite a bit, read quite a bit, then planned a clear 6 hours in my weekend so I could really take my time. Taking my time, the whole deal took less than an hour.
Good luck. Post here if issues, lots here know more than me. PM me if you like, but the M&P15OR is the only gas block I've removed "so far"

Also that AR 15 site, which isn't always as friendly as here, but there are MANY AR experts there.