There are many good posts on the internet on how to create a TFS Plugin, how to use TFS Event Handler, and how to implement the ISubscriber interface, but I always prefer to have a small video with some tips.
Useful links
How to subscribe for TFS Event based on SQL Server notification service