Someone who is selfish cares only about themselves and doesn't consider others. If a ship is sinking and you refuse to let anyone else into your 4-person lifeboat, you're extremely selfish.
Selfish combines the pronoun self-, meaning to or for yourself, with the suffix-ish, for "having the character of." So if your actions are selfish, they all have to do with getting something for yourself, like attention, or candy, or power. Selfish is usually meant to be an insult; someone selfish goes beyond just taking care of themselves, and actively takes from others. The opposite of selfish is self-sacrificing, which means, "giving everything to others and sacrificing your own needs."