Joomla already has powerful form management libraries - jform, supported by jfield. There is plenty of built-in field types (text, textarea, integer, file, calendar and several more). However, once in a while you come across a special field that is not present. Or maybe extending the existing field types to add more features.
These are perfect candidates for creating your own JFields. The JField class is very easy to understand, and using the same you can create any kind of simple or complex fields. Bear in mind that while the JField class will render your field, it's up to your model to save the data.