How do we create hooks in Moodle? And what alternative to hook is available in Moodle?
Moodle has some hooks available, and various plugin APIs. It's probably best if you describe what you're trying to achieve, and someone can point you at the recommended method for implementing it.