I want to know what actually happens internally when the event written in the tap file occurs and how it is handled?
You should read the documents presented at the end of the SystemTap Documentation page, especially the Locating System Problems Using Dynamic Instrumentation OLS paper, to know a bit more about the internals.
The Introduction to KProbes article at LWN is worth a read too.