First off, if you haven't noticed, you can translate them like this:
- ittekimasu 行ってきます
- itterasshai 行ってらっしゃい
See you later.
As you can see, ittekimasu expresses that the speaker is leaving home, and itterasshai bids farewell to someone who's leaving home... but will most likely come back at the same day.
It's often used when an anime character will go to school, or to work, or to his friends house, etc. When he comes back, tadaima ただいま and okaeri お帰り are used instead.
The common thing between these two words is the word itte 行って, which is a conjugation of the verb iku 行く, which means "to go." It's usually used in phrases like this:
- asoko he ikou あそこへ行こう
Let's go over there.
- gakkou ni itta 学校に行った
I (literally) went to school.
- ittemiru 行ってみる
I'll go see.
The words ittekimasu and itterasshai clearly have something to do with going, but there's something amiss here. After all, they don't mean just "to go." And the trick behind this is in the last example above.
The phrase ittemiru 行ってみる, "I'll go see," is the combination of the verb iku 行く, "to go," with the verb miru 見る, "to see." You go, then you see. A similar thing happens with ittekimasu and itterasshai.
The word ittekimasu 行ってきます is a polite conjugation of the word ittekuru 行ってくる, which is the combination of the verbs iku 行く, "to go," with kuru 来る, "to come."
That is, ittekuru, and by extension ittekimasu, both mean "to go and come back." First you go, then you come. So when someone says ittekimasu he's literally saying "I'll be going somewhere and I'll be back sometime," which is exactly what you do when you leave to school or to work or to whatever.
Following the same pattern, itterasshai 行ってらっしゃい is just itte 行ってwith the verb rasshai らっしゃい... except it is not. It's more complicated that.
First off, rasshai らっしゃい is an abbreviation of irasshai いらっしゃい, which comes from the verb irassharu いらっしゃる, which means "to come," exactly the same meaning as the verb kuru 来る.
The difference between irassharu and kuru is that irassharu is used to be polite when talking about other peoples' actions. Meanwhile, kimasu, the polite form of kuru, is used when talking politely about your own actions.
To make matters more complicated, the irasshai we're talking about is an abbreviation too. It abbreviates irasshaimase いらっしゃいませ, which is the imperative form, that is, you're telling someone "to come."
So, to recap, all of these are these same:
- rasshai らっしゃい
- rasshaimase らっしゃいませ
- irasshai いっらっしゃい
- irrasshaimase いらっしゃいませ
That's right, all different ways of telling someone "come here."
After all this we can conclude that itterasshai 行ってらっしゃい is an ultra shortened form of itteirasshaimase 行ってらっしゃいませ.
This happens because the more polite a phrase is in Japanese the longer it is. However, despite all this irasshaimase いらっしゃいませ stuff being pretty polite, it somehow ended up being a common expression used in everyday life. So the word got a little butchered because nobody likes saying big words.
Anyway, as you might have noticed, ittekimasu is just a polite way of saying "I'll come and go" while itterasshai is also just a polite way of telling someone else to "come and go." That is, it's like if I said "I'll go" and you say "go." That's just it.