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.
Extra Detail: The Laws of Cricket
The actual rules of cricket are codified in a document titled "The Laws of Cricket". This is published by the
Marylebone Cricket Club in London, England, and is a copyrighted document, so I cannot reproduce it here.