All call accounting software connects to your PBX and record call records as they are received from your PBX. If the call accounting software is not running the call records are usually lost. Some PBXs can store call accounting records for a while before losing the records.
The simplest call accounting programs run on your computer when you are logged in. If someone else logs into your computer the call accounting software does not receive any records.
Slightly more advanced call accounting software runs in the background and does not require someone to be logged into the computer for the call records to be received - if the computer is switched on the software is running.
The latest call accounting software runs as a very small program on an existing office computer and sends your encrypted call information via the internet to a hosted call accounting system. An alternative version of this is the call accounting application being installed as a black box that sends your call records to a hosted call accounting system. A 'black box' is just a small dedicated computer that just does this one job.