Decisions about what to put in and in how much detail are to an extent determined by audience and purpose, but there are two further principles that can guide you in writing a good CV: selective truth and less is more.
The first thing to be said is that you should never lie on a CV. Having said that, an employer, unlike a court of law, does not require you to tell the whole truth and nothing but the truth. We all have failures in our lives, whether they are failed exams or jobs where we didn't get on. There is no need to mention your failures in your CV. If at school you took three exams and failed one, don't say you failed one, just mention the two you passed. If you started a job, really hated it, argued with your boss and left after 2 months, don't put it on the CV. If someone asks, of course, you will have to tell the truth, but you are under no obligation to present yourself in a bad light from the outset. There is of course a limit to how much you can sweep under the carpet. If you failed a whole 3 year degree, you may have a hard time leaving it out altogether, but you can perhaps mention it as 'other studies'. It doesn't look particularly good, but you should have thought of that when you were out drinking instead of revising for your final exams.
LESS IS MORE
The length of a CV is partly determined by cultural factors - a good Australian CV will be at least 5 pages, a British CV maximum 2- and partly by how long your life has been, but as a rule, it is worth remembering that in whatever situation you send a CV, yours will be just one amongst many. Employers and selectors may have to read a large number of CVs, and if a document does not give them the information they need within 1-2 minutes, they are likely to reject it without looking any further. If you can keep to one page without selling yourself short, do.