There is indeed a big difference: one is used for the direct object and the other is used for the indirect object. Those are different grammatical roles and using one for the other is a serious mistake.
Here is the list of the clitic forms for the direct object and the indirect object respectively.
| D.O. | I.O. |
------------------
| mi | mi |
| ti | ti |
| lo/la | gli/le |
| ci | ci |
| vi | vi |
| li | (gli?) |
You will notice that they are distinguished only at the third person. Moreover, the third person plural doesn't really have a clitic form, although in spoken Italian it is often used gli.
Care should be taken when there are clitic pronouns both for the direct object and the indirect object. In that case the indirect object is always first, and its last vowel is changed from i to e (E.g. Me lo diede, he gave it to me). At the third singular form something weirder happens and the two pronouns combine in glielo, gliela or glieli. This form is correct only when the direct object is a third person pronoun too (although it might be plural), e.g. Gliela diede, he gave her to him.
Last, let me mention that while Duolingo is a pretty good substitute for a practice book (and in some ways it is even better than a traditional practice book), it does a really poor job of explaining the grammar. Its use should be complemented by a good grammar book or, at the very least, the Italian wikicourse.