밥, 음식 , 식사
I will give you some examples you to understand the difference of these words.
1. 밥
1) means (boiled) rice: 밥을 짓는다. 밥 맛이 좋다.
진밥, 된밥 - they are types of rice depends on the amount of water when it boils.
2) means "meal"
밥 먹었니?
밥 먹고 있어요.
밥 좀 드세요.
2. 음식 - food. specifically it means things to eat or drink
엄마가 음식(먹을 것)을 많이 만드셨다.
음식물 쓰레기 - leftover after having a meal/food waste
3) 식사
할아버지 식사하셨어요? (할아버지 - grand father , in this case you need to use 식사 which is more polite way of sayings "밥" with -시-)
cf) 철수야 밥 먹었니? ( 철수 - name of a friend) informal way of saying is okay
If you are confused about usage of "음식", "밥", "식사", keep in you mind that
1) if you can replace the word with "먹을 것" , then you need to use "음식"
2) "식사" is more sophisticated way of saying "밥". Especially if you are talking to someone older than you or total strangers you need to use appropriate words such as "식사", "진지" etc.