Festivals are when a culture's social rules become most visible and, happily, most forgiving toward outsiders. During major celebrations, expected behavior shifts: noise and crowd tolerance rises, generosity and greetings multiply, certain foods or fasting periods shape shared schedules, and specific courtesies appear, like greetings tied to the festival, appropriate dress at religious components, or the custom of giving sweets and gifts. Knowing the season's basics, what is being celebrated and how to wish people well, is the minimum courtesy that locals notice warmly.
On participation, the general rule across most cultures is that respectful joining is welcomed and often actively encouraged. Attending public celebrations, accepting invitations, dressing for the occasion, and trying festival foods are almost universally appreciated. The line to watch is the sacred core: religious rituals may have parts reserved for adherents, so follow your host's lead, ask before photographing ceremonies, and observe quietly where participation is not yours to take.
For newcomers, festivals are honestly the fastest integration shortcut available.