When one thing precedes another, it comes before. You put your socks on before your shoes, you close the door before you lock it, and you should make sure the store is open before you leave home.
The word before comes from the Old English beforan, meaning “in front of” or “in former times.” Before tells when something happens — don’t hire that guy before you check his references — or the position of something: the library is the last building before the intersection. In "before and after" pictures, the "before" ones were taken prior to the makeover, renovation, and so on, while the "after" photos show the improvement.