Both the intensifier tierisch and the figurative though somewhat enigmatic phrase auf den Keks gehen are typical examples of Jugendsprache (teenage slang). But as they are at least several decades old, they are pretty much mainstream nowadays, though obviously quite informal. Neither has any sexual connotations whatsoever.
Tierisch literally means beastly and is quite natural as an intensifier built on a negative adjective/adverb, similar to English intensifiers such as terribly, awfully, frightfully, bloody, crazy, damned etc. Others in German include furchtbar, schrecklich, unheimlich, verdammt.
The origins of jemand auf den Keks gehen are totally obscure, but it is similar in structure to jemand auf die Nerven gehen, jemand auf den Geist gehen, jemand auf den Senkel gehen, jemand auf den Wecker gehen and in English get on someone's nerves. They all have exactly the same meaning and pretty much the same connotations. In German there are variants with sexual connotations, though not very strong ones: auf den Sack gehen, auf die Eier gehen, auf die Nüsse gehen. This corresponds to get on someone's wick in British English.
While there is obviously a lot of variation in what exactly it is that you are getting on when you are annoying someone, there has occasionally been some popular speculation on why a cookie of all things is among the options. Speculative explanations include:
- it's chosen because of the absurdity
- it's chosen because in a sense it's logical: stepping on a cookie destroys it and so annoys the owner
- it's from an old word for Bowler hat
- it's from a Yiddish word for roof
- it's related to einen weichen Keks haben (be a fruitcake)
- Keks was once slang for blotter paper with LSD.
Some of these explanations don't really make much sense given that the phrase only started appearing in print in the early-mid 1970s.