Sun designs CPU chips ('Sparc') that it has manufactured and assembled into computers used as servers. Sun develops and supports an operating system called Solaris, a UNIX variant, that'll run on damned near anything. It's always been 'high end'.
That's what it sells and makes some money on.
On the hardware side, it can't compete with Intel's progress / cash / margins. On the software side, both Windows and Linux, a UNIX variant, are eating it's lunch.
I'd suspect there's a large overlap between IBM and Sun's customer base. Killing off Sparc sooner than later is worth something too.
rr