I understand that "folks" and "people" have the same meaning in this case, but how can I use these words differently in other cases? (When to use folks and when to use people)
You are correct in understanding that they mean the same thing. However, "folks" is more commonly used in America, by people who are older, or when referring to your parents. Additionally, "folks" is more casual than "people". In most circumstances, "people" would be used. Ex: I'm meeting my folks (parents) for lunch today. Ex: The folks in this town are very friendly.