There are basically two mechanisms, which depend on whether the IDM-like product installs itself in the operating system or only inside the browser.
In the case where it installs as a full-fledged product through the operating system, then in Windows for example it sets system-wide hooks, the same mechanism that is used by firewalls and anti-virus products, for monitoring network activity from the Internet. For Windows this is described as :
A hook is a mechanism by which an application can intercept events,
such as messages, mouse actions, and keystrokes. A function that
intercepts a particular type of event is known as a hook procedure. A
hook procedure can act on each event it receives, and then modify or
discard the event.