Selfish means acting for your own benefit at the expense of others. Selfless means acting for others without regard to your own benefit. The two suffixes carry the whole meaning: -ish here marks a leaning towards self, -less marks its absence. Neither word is neutral — one is a criticism, the other praise.
The core difference
- selfish — concerned with your own advantage, typically to someone else's cost.
- selfless — acting without regard to your own advantage.
What the suffixes are doing
-less means "without", as in hopeless or fearless. So selfless is literally "without self". -ish usually means "somewhat" (greenish) or "having the character of" (childish), and it is the second sense at work here.
Not simply a spectrum
They are commonly treated as two ends of one line, but the middle is not nameless: acting in your own interest without harming anyone is neither selfish nor selfless. Self-interested covers that, and it is the neutral word both of these lack.
A word worth not confusing
Self-conscious means aware of oneself, usually uncomfortably. It concerns attention rather than benefit, and belongs to neither of the words above.