The Charcoal pit is not a block. Rather, it is a way of creating charcoal from wood. To start, you will need a fair amount of logs, some non-flammable, full blocks, and a source of fire (Flint and Steel or a Fire starter).
To start, place your logs in log piles, by shift right clicking the logs onto the ground. Each log pile, when opened, can hold sixteen logs. The more logs, the more efficient the charcoal pit will be, in terms of Charcoal gained per log. On average you can expect 16 logs to turn into 7 ~ 8 charcoal.
Next, you should cover all your log piles with a non-flammable, full block. If there are any log piles with sides left uncovered, they will have a high chance of bursting into flames during the conversion process, letting in dangerous oxygen that will cause your charcoal pit turn into a blazing fire. This is bad.
Leave one space open, and on that log, right click with a Fire starter or Flint and Steel. This will light the charcoal pit on fire. Immediately after it lights, cover the exposed log pile with some more blocks. If you have done everything correctly, you should see smoke start to percolate upwards through your cover blocks.
After smoke stops appearing, and the charcoal pit stops making a burning sound, you can dig it up, and retrieve the valuable charcoal underneath.