When a Gemara does not have a solution to a question why does it sometimes it end off with "Teiku" and sometimes with "Kashya"?
My tradition from my rebbi is that kashye means there is an answer but it was not accepted by the gemara. This seems to be how Rashi differentiates a Kashye from a Teyuvta (Sanhedrin 72a).
Kashyes are usually on statements made by Chazal. A Teyku is a doubt in how to pasken an halacha.
You never find Teiku on a kasha only on a shealah. A shealah is a question which comes from too little information ie. "what do I do now?" or "is the law like this way or this way?" A kasha is a contradiction or a question which comes from too much knowledge for instance "how can you say this when yesterday, you said something else?" or "how can you say this when the mishna says something else?". A shealah can be answered in one of two ways A- this is the answer or this is the information you need or B- we don't know and the answer might be this way or this way--TEIKU! A kasha can be answered in one of three ways A- either statement one is true or statement two is correct or B- it is an argument between two opinions or C- we don't know--Kasha! It is important to know what type of question is being asked but you will never find kasha on a shealah and never find Teiku on a kasha. Yussi Abrams
The Mevo Hatalmud in the back of Masechet Brachos explains Teiku that the Talmud has a safek in what the halacha is and they are unable to paskin. If the matter is Mamonot then they will be lenient. If the matter is Isur then they will be stringent. The קיצור כּללי התלמוד which is the back of Masechet Brachos states that when the Gemara ends with קשׁיא it implies that matter is תלוי ועומד i.e. "still hanging" and not nullified by the difficulty that was asked.Rather it is viewed that we didn't yet find a solution. The Ritva in Baba Basra in the second perek that one of the chachamim resolved everywhere that ended with " קשׁיא ". The Radbaz in his work כּללי הגמרא states that as of now there is no terutz until the Gemara will state in the end what the Halacha is. The term קשׁיא is used only in the case where an Amora was asserting the reasoning for a Tanna or any matter and the Gemara asked a difficulty on his reasoning. The difficulty is not on the actual halacha of the Tanna himself.
The Zohar, Ra'aya M'hemnah, in Parshas Tzav says that Teiku means it will always stand as a question, as it stands for Tikun minus the nun sha'arei Binah (the 50 [=Nun] gates of understanding). This is used as a signal that this question comes from the klipos (shells) and could not have an answer because the halacha it is addressing has an element of gezeirah (divine decree) to it and not fully understandable by Man.
It goes on to say that Eliyahu will answer other ones that do not end in "Teiku". As usual, this Zohar needs a Rebbi to explain it.