以前 indicates that an action happened or will happen before until a certain moment or event.
以后 indicates that an action happened or will happen after a certain moment or event.
In a sentence, 以前 and 以后 are used as parts of an adverbial modifier of time. A subject is placed either at the beginning of a sentence or between 以前/以后 and a predicate.
以前 can be shortened to 前, and 以后 can be shortened to 后.
We should be there before dark
wǒmen tiān hēi yǐqián yīnggāi néng gǎndào
Students must be at school by 8 a.m.
xuéshēng xū zài bā diǎn qián dào xiào
My life has changed since I met her
yùdào le tā yǐhòu, wǒ de shēnghuó jiù bù yíyàng le
Books cannot be borrowed after 6 p.m. tomorrow
xiàbān hòu, wǒ yào xuéxí zhōngwén
The adverbs 以前 and 以后
以前 and 以后 can also be adverbs and used independently.
In a sentence, they are also used as parts of an adverbial modifier of time.