以前 (yǐqián) means "before" and 以后 (yǐhòu) means "after". On their own they mean "in the past" and "in the future". After an action or a time, they mean "before..." and "after...", but the word order is the opposite of English.
以前 on its own means "before", "in the past" or "used to". 以后 on its own means "later" or "in the future". Like other time words, they go at the start of the sentence or right after the subject.
Action or time + 以前 / 以后.
To say "before eating" or "after class", the action comes first and 以前 or 以后 comes after it: 吃饭以前, 下课以后. The most common mistake is to follow English word order and say 以前吃饭. The same goes for clock times: 十点以后 is "after ten o'clock".
After a length of time, 以前 means "ago" and 以后 means "in... time" or "later". In speech you will also hear the short forms 前 and 后: 三天前, 睡觉前.
On its own, 以后 looks forward to the future. To say "later" or "after that" when you tell a story about the past, Chinese usually uses 后来 (hòulái) instead.
Practise this grammar point on paper: 17 exercises using only HSK 3 words, with an answer key on a separate page. Free to print and copy for your class.
Every example on this page uses only words up to HSK 3. Paste your own sentences into the level checker to see which words, if any, are above your level.