Rioting involves the use of force or violence by an unlawful assembly, while affray is a situation where two or more individuals engage in a public fight causing terror. Both are separate offenses, but Section 143 IPC can apply to either situation.