How Plug-Ins Work

Technically, a plug-in is a small program written in the same programming language
(PHP) that runs the entire WordPress system.

Plug-ins work by inserting themselves into various WordPress operations. For
example, before WordPress displays a post, it checks to see if you installed any
plug-ins related to displaying posts. If you did, WordPress calls them into action.
This sort of check is called a hook, and WordPress has a long list of hooks that
launch plug-ins. A WordPress page can also use a special code, called a template
tag, to ask a plug-in to insert something in a specific place on a page. Either way, the
interaction between a WordPress site and its plug-ins happens behind the scenes,
without your intervention.
Building plug-ins is a fairly ambitious task, because it requires programming skills
and an intimate knowledge of the way WordPress works. Fortunately, there are
plenty of good plug-ins you can use without writing a stitch of code. Most WordPress
site owners spend a good deal of time picking the right plug-ins for their sites and
tweaking them just so. Very few write their own.

How Plug-Ins Work