Something that's deadly can kill you. Because a gun can end someone's life, it's a deadly weapon.
If someone's diagnosed with a deadly disease, it's lethal — it's capable of ending the person's life. When you hear someone talk about police officers using "deadly force," they mean actions that intended to cause death, or understood to be capable of killing someone. You can also use the word to mean "extremely" or "very," as when you describe your math class as deadly boring.