Ли is a particle which marks an indirect question. It can NEVER start a sentence: "ли" is placed AFTER a word to which it is related (usually a verb, but not only a verb), and it is pronounced as a single word with the word it follows. It does not have a separate stress, and no pause is possible. E.g., "знает ли", "хочет ли", "приедет ли" are all pronounced as single words.
Usage:
1) [Clause A], ... ли ... .
Clause A usually contains verbs like "to know", "to ask", "to say", "to understand" etc. which express an indirect speech, or a question, or someone's thought (knowledge, understanding, decisions etc.).
Examples:
Я спросил его, пойдёт ли он со мной. - I asked him whether (if) he would go with me.
Я не знаю, будет ли завтра дождь. - I do not know whether (if) it will rain tomorrow.
Я не понимаю, должен ли я начинать работу. - I do not understand whether (if) I should start the work.
Я ещё не решил, поеду ли я в Москву. - I have not decided yet whether (if) I will go to Moscow.
Эта стрелка показывает, закончилось ли время. - This arrow shows whether (if) the time has finished.
This particle can be placed after any word to which it relates. But it never starts a sentence or a clause.
Compare:
Я спросил его, поедет ли Иван с моим другом в Москву. - I asked him if Ivan would go with my friend to Moscow. (Ivan will go? or Ivan will not go?)
Я спросил его, Иван ли поедет с моим другом в Москву. - I asked him if it is Ivan who will go with my friend to Moscow. (Ivan will go? or Someone else will go?)
Я спросил его, с моим ли другом Иван поедет в Москву. - I asked him if Ivan would go with my friend to Moscow. (Ivan will go with MY friend? or Ivan will go with (e.g.) HIS friend?)
Я спросил его, с моим другом ли Иван поедет в Москву. - I asked him if Ivan would go with my friend to Moscow. (Ivan will go with MY FRIEND? or Ivan will go with (e.g.) MY BROTHER?)
Я спросил его, в Москву ли поедет Иван с моим другом. - I asked him if Ivan would go with my friend to Moscow. (Ivan will go to Moscow? or Ivan will go to (e.g.) St Petersburg?)
2) ... ли ... ?
In this case, "ли" just helps to form a question (to emphasize the questionable word). And it can easily be skipped.
Не хотите ли чаю? = Не хотите чаю? (Would you like some tea?)
Умеете ли вы говорить по-русски? = Вы умеете говорить по-русски? (Are you able to speak Russian?)
Звонили ли вы ему вчера? = Вы ему звонили вчера? (Did you call him yesterday?)
Note, that this usage (2) is not common in colloquial speech, however. Questions with "ли" are more common in questionnaire forms, and they sound too "artificial" if being asked in a daily conversation.