Sides take turns to bat in successive innings and attempt to score runs, while the opposing side fields and attempts to bring an end to the batting team's innings. After each team has batted an equal number of innings (either one or two, depending on conditions chosen before the game), the team with the most runs wins.
A game of cricket is called a match. Play may extend over multiple days, with breaks for meals and overnight rest.
The Laws of Cricket are available at the official website of Lord's Cricket Ground. They are very terse and the language can be slightly archaic, so I do not recommend trying to learn cricket by reading them.
The Laws are complemented by additional Rules and Regulations codified by the International Cricket Council. These are available at the official website of the ICC. Many of these regulations are complex, and you will find simpler interpretations here on my site.