Yeah, systems vary on this - so do Android keyboards - unless you have Google's Pixel or Nokia, you likely have some custom keyboard, not the default Android one, but so do I - I think both Swype (not available anymore, but I love it even if the skins can't be bought (or bought ones redownloaded anymore), syncing is off, etc. Nuance has dropped support - they have excellent speech recognition system available for various systems, including Android (works as keyboard) that let's you do anything you would be able with keyboard, but they should have kept the lesser version (Dragon, that's why it was called Swype + Dragon), but it's still the only one with selection/editing mode available... BUT I DIGRESS...
On most systems, there's a way to compose characters not on keyboard, and on Linux it can be highly configurable, depending on your desktop environment. For example, I have set it to 4th level of right Ctrl (So AltGr+Right Ctrl). Then I type oo to get degree symbol. There are easily found a whole load of list of characters and keys you can enter them with. I would be surprised if OS X didn't have similar compose key, but not that much if it wasn't configurable. However composing with two 'o' characters is the easiest way to get the degree symbol. The OS X advice relies on entering Unicode value of the character. That's not possible on all system, and very cumbersome to remember, especially if you need more than one composed character, like me with µMatrix/µBlock Origin :D But it does allow entering ANY unicode character, which has it's uses. On Linux you might have to do it on terminal and copy output and paste it to, say, email program. But for common characters, but non-alphabets/numbers composing is easier. Like € and ¢ (well, I don't need compose for euro, but it's "e" and "-"; cent is "c" and "|".
There were many more lacking and some more complicated answers here, so I hope this helps.