By is used to indicate proximity, the person that performs an action in a passive sentence, an action with a particular purpose, a means or method, a deadline, the person or thing that performs an action, how something is done, measurements or amounts, how frequently something increases or changes, and someone's character, job, etc.
With is used to indicate using something.
Beside is only used as a preposition meaning either "next to" or "compared to" and is always followed by a noun, with "next to" being more common.