Survey 55 students with two questions: which grade are you in, and which do you prefer, soccer or basketball? Each student lands in exactly one of four boxes: 6th and soccer, 6th and basketball, 7th and soccer, 7th and basketball. Put grades down the side, sports across the top, and write the counts in the boxes: 15, 10, 12 and 18. These inner counts are joint frequencies, because each one describes two facts at once.
Add across each row and down each column, and write the totals on the edges, the margins: 25 sixth graders, 30 seventh graders, 27 soccer fans, 28 basketball fans, 55 in all. These marginal frequencies each describe one variable and ignore the other. Now you can compare fairly: 18 of the 30 seventh graders chose basketball, which is 60%, while 10 of the 25 sixth graders did, which is 40%. Each of those is a conditional frequency, a cell divided by the total of the group you are looking at.
Not every grid is a two-way table. A grid of test scores, with students down the side and subjects across the top, holds measurements, not counts of people in categories, and adding a column gives a total score, which means something quite different. In a two-way table each inner number counts how many individuals fall into a pair of categories, and every individual is counted exactly once.
Think of it like this. A two-way table is like a sock drawer with dividers running both ways: one set separates colours, the other separates sizes. Each compartment holds one colour-and-size combination, the totals on the edges count all the black socks or all the large ones, and every sock sits in exactly one compartment.
Core idea. A two-way table arranges counts for two categorical variables in rows and columns, with margins as totals.