lol,, ehsan bhai... that explanation even made me go round n round in circles... too many people going in and out....
shinoo,, me being the man that i am,,, would like to explain it to u.
i hope u know what an innings is. one sides full "baari" is an inning. i,e 10 out of their 11 player have to be bowled out by the opposition bowlers...
ok now that u know what an innings is...
test match has two innings each,, i,e both sides get 2 "baari's" each.
the first team bats, and tries and scores as many runs as possible. When they are bowled out, the second team takes their turn. and try and make as many runs as possible and ideally, to surpass the other teams score.... and then the first team takes their second turn, followed by the second team's second innings...
khair,,, sabi's explanation is simple enough....
then there are other things like...
for example the At team bats and scores 600 runs for the loss of 5 wickets and 2 whole days have gone.... now in this scenario, if the captain of A team reckons its enough score for them, he can "declare" their innings,, which means now the B team takes their turn and the A team tries and bowl em out. Now, say for example, B team are all out for 360 runs. That gives the A team a lead of 240 runs. At this point, since the lead is more than 200 runs, the A team captain has the option of give the B team what is called a "follow on". If he decides to "follow on" the B team, the B team then has to bat again and score as many runs as possible. This time around, say the B team scores 300 runs. Since the lead already was 240, and B scored, 300, now the winning target for A is gonna be 60 runs. Or in another scenario, say B team were made to "follow on" by the A team, and the lead is 240, and if the B team gets out for say 210, the A team has won by an innings and 10 runs.
apart from this,,, if the match for some reason couldnt be finished within 5 days, it is then a draw and doesnt really matter which team had the upper hand in the match.
I hope I was at least better than ehsan at explaining :D