in most cases (of airlines supporting it), you have to use the airline's own app
some airlines support sending you a mobile-optimised version of your boarding pass by e-mail or MMS
other airlines will allow adding the boarding pass to the iOS "wallet" (previously known as Passbook), either from their own app, from their mobile website, or from an e-mail or text message. Not sure if there is an Android equivalent.
This is indeed not always possible in all airports and/or for all flights. The check-in process should prevent you from choosing mobile boarding pass for those airports that don't support it.