Please give some reference site for creating a simple extension for civicrm with sample example. Any simple extension on GitHub.
You need to install civix to create civicrm extension and then follow documentation for creating module extension. There are many examples of extension under civicrm.org. The easiest one to start would be
As a first step I would go check the Developer Guide here: https://docs.civicrm.org/dev/en/latest/extensions/