As a preposition, it can mean 'near,' 'through the action of,' or 'no later than,' as in 'by the door,' 'written by her,' or 'by Monday.' As an adverb, it can mean 'past' or 'aside,' as in 'walked by.'
From Old English 'bi' meaning 'near, about, alongside.' It is part of a very old family of little direction words in Germanic languages. Through time, its sense of nearness grew into ideas of agency ('done by') and deadline ('by Friday').
This tiny word quietly does an enormous amount of work in English—place, time, and responsibility all flow through 'by.' When you say 'by hand' or 'by accident,' you’re using old spatial ideas to explain how something happened. It shows how often English recycles simple location words into complex abstract meanings.
Complete word intelligence in one call. Free tier — 50 lookups/day.