A match is played on a "Best of X frames" basis, with X usually 5-9 for small tournaments but can be higher for major tournaments. For the world championships the first round is played best of 19, then best of 25 until the semi-finals which are best of 33, and the final is best of 35. It's played in "sessions" of 8 frames at a time, but if a match gets close it the final session could be longer (for example, a world championship first round match that went all the way would be an 8 frame session followed by an 11 frame session).
Each individual frame is played with a set up of 15 red balls, and one each of six colours. There is also a white ball (called the cue ball) which players strike with their 'cue' (aka: stick). You use the cue ball to hit other balls and hopefully "pot" other balls. You probably know all this already so I'm gonna assume you do and move on...
In each frame, the 15 red balls must be potted first. However, whenever a red ball is potted, the player whose turn it is gets one opportunity to pot a "colour" (i.e. not red) as well. If they miss, it's back to red for the opponent. If they pot it, the colour is returned to its spot and they stay on and try to pot another red. Reds are worth 1 point each and the colours are worth 2-7 respectively for yellow, green, brown, blue, pink, black. After all reds are potted, the players must pot the colours in order for their respective values and whoever has the most points wins the frame.
If a player plays a shot against the rules at any point a foul is declared and their opponent is awarded a minimum of 4 points. More points are awarded if the foul was on a ball of value higher than 4. The fouling player's opponent then has the chance to play, but may also opt to let the fouling player play again if the balls lie unfavourably. In certain situations (which I wouldn't worry about at the moment), the non-fouling player can opt to have the balls replaced to where they were before the foul occured, and have their opponent retake the shot.
Any string of pots without the opponent having a shot (i.e. red, black, red, green, red, blue, red, miss) is referred to as a "break". Breaks do not determine the winner of a match but they are spoken about a lot. "Century" breaks are when a player makes a break of 100 or more, and the "Maximum" break is 147 (15 reds followed by blacks, and all colours) and the player who makes the highest break of a tournament is often awarded a special prize, with an additional bonus for anybody who can make a maximum break (they're hard). Big breaks aren't compulsory, but they are crowd pleasing.
And the maximum possible break is actually 155 but I don't think it's ever been done and nobody ever talks about it and it requires a "free ball" which I haven't even mentioned so you should probably just ignore the fact I even mentioned this.