force:inputField component is used to display fields of a particular sObject with the appropriate type. In other words, we don’t have to explicitly specify the type of the field. The component automatically renders the type.
For example: If the type of the field is date, then displays the Data Picker. Similarly if it is picklist, then a dropdown appears.
Note:
Try demo:
For more details refer to
https://developer.salesforce.com/docs/component-library/bundle/force:inputField/specification