How to generate 'tag' field in form config module? I'm need to create a tag field (the field that you see in this stackexchange.com website for tagging)

I'm wondering is there any api for this or this has to be created from scratch?

If this has to be created from scratch, how to make a 'custom' field in drupal - a very simple sample will be much appreciated.
The standard site install includes a "Tags" taxonomy vocabulary, and includes a "Tags" field on the "Article" content type.  You can either reuse these components on your own site, or duplicate them for your particular use case.