을/를 marks the direct object of a verb (을 after a consonant, 를 after a vowel). 에 marks the destination of a movement or a specific point in time. 에서 marks the place where an action happens. Where English uses word order and prepositions, Korean attaches a particle after the noun.
빵을 먹어요.
ppangeul meogeoyo.
I eat bread.
학교에 가요.
hakgyoe gayo.
I go to school.
카페에서 공부해요.
kapeeseo gongbuhaeyo.
I study at a cafe.
When do you use this?
Particles show what role a noun plays in the sentence: 을/를 marks the object, as in 빵을 먹어요; 에 marks the destination of a movement, as in 학교에 가요, or a specific time, as in 세 시에 만나요; and 에서 marks the place where an action happens, as in 학교에서 공부해요. After a noun ending in a consonant use 을, and after a vowel use 를.
Common mistake
학교에 공부해요 sounds unnatural if you mean that the studying happens at school; say 학교에서 공부해요. With the verb 가요, for going to school, say 학교에 가요.
Try it yourself
Fill in the blank: 카페___ 공부해요. (I study at a cafe.)