Commonly, the same mechanisms as in the browser. Very often applications use a API made available over https. It's cheap to implement, well supported and fairly robust.
Even if not using http, it's common to use TLS to secure the traffic. This includes protocols such as imaps, smtp+starttls and so forth. TLS is a common and widely supported protocol, that can be implemented quickly and robustly in application with custom protocols.