If I understood correctly, both 完 and 了 can be used to indicate a completed action, so what is the difference in use? How do we properly use 完 in a sentence? Which contexts would be valid?
You can use 完 and 了 together or separately.
- 了 is usually used to indicate the completion of an action. E.g. 你买了好多东西 (You purchased a lot of stuff). See the question "Tense and use of 了" to learn more.
- 完 is used to indicate the action of completing/finishing something. E.g. "說話沒完的人" (a motormouth, someone who talks to no end). Usually it's verb + 完.
完了 can have 3 different meanings/uses.
- Verb + 完了 can indicate that the (verb) action has come to an end.
- Noun + 完了 indicate the feeling of despair or the end of something . E.g., 哎呀，我完了！ (On no, I'm finished/done for!) or 那個車完了(That car is finished/done for!).
- 完了 by itself (usually at the beginning of a sentence) is usually an exclamation of despair. E.g., 完了, 车没油了！回不了家了！ (We're/I'm done [for], the car's out of gas. We/I can't go [back] home [now]).
没完 can be used to describe things left undone, or something never-ending/eternal. E.g., 活儿还没完 (Work is not done/finished yet) or "說話沒完的人" (a motormouth, someone who talks to no end).
The other answers give some good examples, so I'll try to provide an answer from a grammatical perspective.
完 can be used as a resultative complement meaning "to finish doing something". You put it after a verb to mean that you finished doing that verb. 「吃完」 means "finish eating".
了 has many different uses, but the one that I first learned was as a past tense marker. 「吃了」 means "ate".
Now, to talk about something that you finished doing in the past, you combine the two. 「我吃完了」 means, "I finished eating."
There's a ton more detail to learn with these two words. I suggest you look at the Chinese grammar wiki complements page, the completion with 了 page, and maybe the many uses of 了 page. I expect most beginner or early intermediate textbooks will cover these topics as well.
All answers miss an important point: the two words are total two different stuff at all! 完 is a verb while 了 is an auxiliary word.
完 in case of this question is used as a secondary part of a compound verb, it denotes the result of the dominated verb. Such kind of compound verbs are called Resultative Compound Verbs. In most situations, say 写完了报告, 了 is used with the whole compound verb instead of just 完. They are not connected as they seem!
没 and 完 can be used together to indicate an action that has yet to be completed in this pattern 没 + V + 完 for example:
没看完 or 没吃完
To mean I haven't finished watching/reading it or I haven't finished eating (it)
You can also combine the two in this case it would be:
没看完了 or 没吃完了
To mean the same as above.
However the following:
没看了 or 没吃了
This means I haven't seen/read (it) or I haven't eaten (it)
这本书我还没看了 or 他的冰淇淋还么吃了
I (still) haven't read this book or He/she hasn't eaten their ice-cream.