In depth
Says that you will go somewhere, do something there, and come back to where you are now. It is very common when briefly stepping out ("I'll just go and..."), and the past form (買ってきました) reports an errand you went out and did. In this use 来ます is often written in hiragana as きます, and 行ってきます is also the set phrase for leaving the house.
ちょっとタバコを買って来ます
chotto tabako o katte kimasu
I'm just popping out to buy some cigarettes
スーパーで牛乳を買って来ます
suupaa de gyuunyuu o katte kimasu
I'll go and buy some milk from the supermarket
台所からコップを取って来ます
daidokoro kara koppu o totte kimasu
I'll get a glass from the kitchen
郵便局へ行って来ます
yuubin kyoku e itte kimasu
I'll go to the post office (and come back)
ちょっとトイレに行ってきます。
chotto toire ni itte kimasu.
I'm just going to the restroom (I'll be right back).
駅前の銀行でお金を下ろしてきます。
ekimae no ginkou de okane o oroshite kimasu.
I'll go withdraw some money at the bank in front of the station.
先生に質問してきます。
sensei ni shitsumon shite kimasu.
I'll go and ask the teacher a question.
寒いから、上着を取ってきます。
samui kara, uwagi o totte kimasu.
It's cold, so I'll go and get my jacket.
昨日、図書館で本を借りてきました。
kinou, toshokan de hon o karite kimashita.
Yesterday I went to the library and borrowed a book.
雨が降りそうだから、洗濯物を入れてきます。
ame ga furi sou da kara, sentakubutsu o irete kimasu.
It looks like rain, so I'll go and bring the laundry in.
車にかばんを忘れたので、取ってきます。
kuruma ni kaban o wasureta node, totte kimasu.
I left my bag in the car, so I'll just go and get it.
子供を幼稚園に迎えに行ってきます。
kodomo o youchien ni mukae ni itte kimasu.
I'm going to go and pick my child up from kindergarten.
昼休みに、近くの公園を散歩してきました。
hiruyasumi ni, chikaku no kouen o sanpo shite kimashita.
I went for a walk in the nearby park during my lunch break.
Watch out
買いに行きます only says you are going to buy something, while 買ってきます adds that you will come back with it. Vてくる also has other uses, such as a change starting (雨が降ってきました "it has started to rain"), which have nothing to do with going and returning.