Why I have pimples after shaving?

I recently shaved my chest hair and my beard and I have gotten pimples on my chest and under my chin since then, what is the cause of that and can I get rid of them?

Why I have pimples after shaving?
Post Opinion