As a modal verb, 'can' expresses ability or possibility, as in 'I can swim.' As a noun, a can is a metal container for food or drink, and as a verb, it means to put food in cans or to dismiss someone from a job (informal).
The verb comes from Old English 'cunnan' meaning 'to know how, to be able.' It gradually turned into a modal helping verb and lost many normal verb forms. The noun 'can' is from a different root, from Old English 'canne' meaning 'container' or 'cup.'
Two totally different words—ability and metal container—just happen to look and sound the same in modern English. The ability 'can' is really about 'knowing how,' which is why 'can' and 'know' are cousins way back in history. The container 'can' connects to 'canister' and 'cannon,' all about hollow metal shapes.
Complete word intelligence in one call. Free tier — 50 lookups/day.