How can I write a good composition without grammar mistakes ?Also, while writing a composition, I feel that either I have no ideas or too many ideas about the composition I am writing. What can I do?
The easiest way to avoid sentence level grammar mistakes when writing compositions is to memorize the simple Who What model of English sentence structure. This model is the same as the Somebody Something model you may have seen utilized in dictionaries, such as Longman Dictionary of Contemporary English, as in the definition of throw:
throw something to somebody: He threw his shirt to someone in the crowd.
throw something at somebody/something: Someone threw a stone at the car.
throw somebody something: Throw me that towel, would you.
These models can guide you to constructing sentences that are free of error. The Who What model asks these questions: Who Did What to Whom Where When How and Why. It's rather like the prescribed accusation in the world famous Clue game: "I suspect Colonel Mustard killed him in the Ballroom with the candle stick [for the purpose of getting the jewels from the safe!]."
Look at that Clue sentence this way: "I suspect Colonel Mustard [Who] killed [Did What] him [Whom] in the Ballroom [Where; we might insert "yesterday" for When] with the candle stick [How] for the jewels [Why].
This model provides the basic order of an English sentence. Of course the elements of How, Why, When and Where, as adverbials, may be moved to other locations in the sentence [e.g., I suspect that yesterday he was killed for the jewels with the candle stick in the ballroom by Colonel Mustard, etc] but until you are very confident with the Who What model in its standard form, it is recommended that you use only the standard form.
Precisely the same thing can be accomplished through using the Somebody Something model, which uses assertions instead of questions. The only advantage of one model over the other relates to your preference: If you prefer to think in questions (Who? Did what? etc), then use the Who What model. If you prefer to think in assertions (Somebody Did Something etc) then use the Somebody Something model. The Somebody Something model goes like this: Somebody Did Something to Somebody Somewhere at Some Time with Something (or Somehow) for Some Purpose (or for Some Reason).
Word level grammar has many more points to it, but some things that commonly affect writing are noun - verb agreement, articles, and prepositions. Firstly, nouns and verbs must agree in number. This means that when you have a plural noun, you must also have a plural verb. A singular noun (one horse, deer, plate, moose etc.) goes with a singular verb (e.g., is, has, runs, walks, goes, falls, etc). A plural noun (two or more horses, deer, socks etc.) goes with a plural verb (e.g., run, have, are, walk, go, etc.).
Secondly, especially in American English, nouns most often require an article (a, an, the) in front of them unless they have a noun or pronoun in front (our car; Martin's car): a decibel, a door, the door, the car, the hospital, a hospital, etc.
Thirdly, prepositions can be tricky to use as some overlap in meaning. For preposition use, the best advice is to look up the meanings and common usage of the prepositions in question in a dictionary; you'll find guidance from a dictionary about which preposition to use (e.g., I might have written: you'll find guidance in a dictionary on which to use).
You are really asking about two different things - ideas and technique.
A tried and true plan is to write an outline first. The first step is to try to decide upon the main idea or point you want to make. Then do some storyboarding and try to sort the ideas in a logical way, in an order that seems to make sense to you and in an order that supports or relates to your main idea. You can look up how to do this online. After you see the ideas written down, you can eliminate the ones that don't seem to back up your main idea.
If you have too few ideas, do the same thing, only in this case, you will have to fill in your outline with additional ideas in order to have enough to write about.
In each way, it helps to get input from others - either your instructor or other students. Brainstorming with others will alert you to ideas that you may not have considered.
The grammar is an entirely different issue. You should make use of the grammar and spelling check on whatever word processing software you are using, but beware! Those spell/grammar checks are not 100% correct. The software will underline grammar mistakes, spelling mistakes, and you can configure it to also underline mistakes in usage - such as too much passive voice - but again, this is not 100% reliable. Try to have someone else edit your paper when you think you are finished.
As a writer and editor myself, I can advise you that one is never done editing and revising. Edit, edit, edit - it is painful, but necessary, if you want to write well. I always have several people look over my writing - even after I have edited it a million times myself. Another set of eyes never hurts. It is embarassing for everyone to re-read something and find errors. Even in answering these questions on eNotes, I sometimes find that when I am typing fast or thinking and typing at the same time, I make dumb mistakes. Luckily, there is an EDIT feature where I can go back and correct things.