There's even an exceptional word which mixes hiragana, katakana, and kanji, くノ一.
Generally speaking, words are written with mixed writing systems when there are reasons to write different parts in different ways. (Sounds obvious, huh?)
For example, in Tokyo Nagoya's example of あんパン, the first morpheme comes from Chinese 餡{あん}, and the second from Portuguese pão. パン may be written in katakana, reflecting its origin, while hiragana is more natural for あん.
Another common reason to use katakana is for slang terms, including slang uses of existing words (like モテる) and colloquial shortenings of existing words, as in キモい from 気持ち悪い.
Any of these motivations for using katakana (foreign origin, slang, onomatopoeia) can compete with the tendency to write endings like い and る in hiragana, resulting in a mixed word.
Let's take a look at your example of ググる:
Here, the loanword Google (グーグル gūguru) has been reanalyzed as a verb. Since Japanese has a lot of inflectional morphology, it's harder for words to jump categories; it still happens, but it's easiest for words that already end in ru like this one (or ダブる "double", トラブる "trouble", etc.).
As is usual for this sort of derivation, any long vowels are removed (グーグル gūguru becomes ググル guguru), and then the final ru is reanalyzed as r-u, giving the godan verb ググる gugur-u. The ending -u is usually written in hiragana, and therefore the r before it must be as well, but the rest of the word remains in katakana.
If the source word doesn't end in ru, then it needs to be added, as in ミスる (from ミス "miss") or コピる (from コピー "copy"), and if the word is long it may be clipped, as in the slang ハモる (from ハーモニー "harmony"). In these cases the words still conjugate as godan, meaning that コピる is kopir-u rather than kopi-ru, even though the r wasn't present in the original word. You can find more colloquial examples here.
Occasionally words ending in i are reanalyzed as colloquial adjectives, and quite rarely from sii as well, as in the rare colloquial セクしい from セクシー, and when this happens the suffix is written in hiragana. If i isn't present, it can be added. Less uncommonly い is added to existing words, which may be shortened, as in グロい from グロテスク "grotesque". A more common example is エロい "erotic".
So there are lots of different reasons words end up written with mixed writing systems.