Osquery operates through osqueryi for ad-hoc queries and osqueryd for scheduled queries. It requires system privileges for detailed information.