Difference between Field and Field Instance? When we go to the path /admin/structure/types/manage/article/fields and use the Add new field option or the Add existing field option, does that create a field, create a field instance or attach a field instance? How to differentiate between them? So, programmatically, when to use field_create_field, field_create_instance and field_attach API?

In the field API documentation it only mentions the admin UI and never talks about the path where to create both fields and field instances. So it's confusing. I don't even know if I even make sense.
A field is the basic definition of a field itself.
A field instance is an instance of that field, attached to an entity/bundle.


Fields are created with field_create_field
Field instances, with field_create_instance


To check if the field, or instance exists, use


field_info_field or
field_info_instance


When you create a field through the UI, Drupal always creates a field instance on that entity/bundle.

If you're adding an existing field, the field data is cloned and a field instance is created on the new entity/bundle.

Lastly, field settings apply globally to that field, field instance settings can vary between entity bundles.