While 行きます means just go somewhere, 行ってきます means the same but also implies to come back. The reason why it means not only go but also come back is that 行ってくる consists of 行く(go)+くる (戻って来る come back.) However, it doesn't mean promising to come back. Even though the term of this expression is implying to come back as well, a lot of people use this as just go.
If I say I go to the library, I am just explaining to go there,
on the other hand, if I say "libraryに行ってきます," This also means 行く+来る(戻ってくる)go to the library and will come back to here.