It works with the help of an Account Aggregator. Jupiter uses Finvu Account Aggregator.
You can read more information about such services here