What is Schema and settings.yml files in config folder in drupal 8 modules

We people have seen that contributed modules have config folder.

Name (config) itself say its for some kind of configuration,

Yes, Config  folder would contain configuration for that module.

Most config folder will contain install folder where in  we can set our module settings by creating settings file there. modulename.settings.yml.

Let me explore it with an example,

You may have scenario to create module where in it will trigger email to email id on one particular page is hit

You can set your email and page url in modulename.settings.yml file   

You can add another modulename.schema.yml file in config/schema folder

this file will validate whether values  given in modulename.settings.yml  is string or integer

email: 1 // you may give like this

page:1 // you may give like this

it will through error, if you given it wrongly