A normal follicle looks like this:

For reasons no one completely understands, follicles, often called pores, sometimes get blocked. Sebum (oil) which normally drains to the surface gets blocked and bacteria begins to grow. Both whiteheads and blackheads start out as a microcomedone. The picture below is a microcomedone: