わがまま describes putting one's own wishes ahead of everyone else's — selfish, self-indulgent, wilful. It is used constantly of children who will not do as they are told, and of adults who behave the same way.
It is both a na-adjective and a noun. As a noun it names the selfish behaviour itself, which is why it takes を and a verb: わがままを言う is literally 'to say a selfishness,' i.e. to make demands one has no right to make.
Common patterns
Register: usually a criticism, but it is very often turned on oneself as a softener — わがままを言ってすみません, 'sorry to be difficult,' is a normal way to preface an inconvenient request. Said of a child it is mild; said flatly of an adult it stings.
Similar words: 自分勝手 is blunter and purely critical, with none of わがまま's affectionate or self-deprecating uses. The opposite quality is 素直, being frank and unresisting.
Orthography: usually written in hiragana; the kanji 我儘 exists but is uncommon.