You install a package with pkgadd, see man page for detailed instruction.
You could for example check docs.sun.com, go to the appropriate page for the Solaris release you're using, and check the name of the package you need in the Release and Installation collection.
For the latest Solaris 10 release, http://docs.sun.com/app/docs/coll/1236.8
. You'll see that the packages you need are:
SUNWsmbac samba - A Windows SMB/CIFS fileserver for UNIX (client)
SUNWsmbar samba - A Windows SMB/CIFS fileserver for UNIX (Root)
SUNWsmbau samba - A Windows SMB/CIFS fileserver for UNIX (Usr)
I would also check administration documentation to see if there are some particular instruction for Samba.
To install the packages, just go to their directory and run pkgadd -d [packagename].
The Basic Administration document (http://docs.sun.com/app/docs/doc/817-1985
) chapter 18 is just what you're looking for.