It's not a noun, verb, or adjective. It's a word that shows the relationship between a noun or pronoun and another word in the sentence.
For example:
* "The book was written by Jane Austen." Here, "by" shows the relationship between the book and Jane Austen.
* "I walked by the park." Here, "by" shows the relationship between walking and the park.