depends on what version of ubuntu you require to use.
the samba version is what really matters.
to become a member of active directory, you would join the server as described in the documentation for samba
then google how to either become a member server, or clone its data from the ads, and then reconfigure the smb.conf to be standalone
to do it without windows active directory (or just domains for nt4 servers)
create the server with a wizard if your not sure, or edit a sample smb.conf in the help/documentation to your requirements (also known as standalone server mode)
it uses LDAP or NIS for its services. (depending which way you choose to setup)
zentyal has server software (and was based on ubuntu, previously known as EBOX)
could be worth looking into.
mabye if u are stuck for which way, always consult google first, then the ubuntu community.
this way i can assure you you would save yourself some time, plus are more likley to be helped quicker due to you did some research first :-)
anyways for client computers and servers (depending on what os'es your planning to use heres a list "based on my personal experience only")
it comes with no warranty, guarantees, it could be fit for reference of my experience, but not for purpose as things change fast in linux / ubuntu / samba.
with that said, here is that list i mentioned.
NT based Windows versions
Windows xp professional / media centre editions
(works both ways for joining networks, home editions doesn't do server connectivity)
Windows 7/vista
(could work both ways, but needs registry changes to use the standalone properly, but can make the os slightly less secure.)
Windows 2008 & 2008 R2
(join its domain, clone the ads @where possible@ and then de-join by reconfiguring it to be standalone, using smb.conf @cannot be used as bdc to samba@
(well, unless theres been changes since i last checked, but to my knowledge,then no, it cannot.)
Windows 2003
(can do same as 2008, but has the ability to join either methods, as its from same code-base as xp)
Windows 2000 servers
(the standalone is almost the equivalent of a 2000 active directory)
Windows 2000 pro
(can join both but i think it would need for newer ads versions to be in compatible mode @sometimes explained as not secure@ )
Windows nt 4.5 back-office (the upgrade discs, technically not an out right standalone os)
(it doesnt have active directory, but used a service before ADS was born called "Back Office", use this reference as the same as NT 4 server)
Windows nt 4
(standalone method only, nt4 doesn't have ADS as far as i know)
Windows nt 4server
(same as above, but u can join the ubuntu to a nt4 domain, and set ubuntu to be the PDC, and the nt4 as BDC if u wanted)
Windows nt 3.x (server)
(standalone only, i dont know if it can be the PDC to ubuntu, i think its BDC to ubuntu only due to its age)
previous versions of Windows NT
(i doubt you use them, and would think irrelevant)
Non-NT based Windows versions
Windows Milennium edition
(no direct domain connections, but can use logons for profiles and remote shares, but is un-secured as the logons are in the registry, as plain text, as far as i know.
Windows 98 & 98 SE
(same as milennium edition)
Windows 95
(same as milennium edition)
Windows 3.1.1 for workgroups
(technically not an os, but can link for shares only, if used with network adaptor addons such as novell netware, which would require software equivilents for ubuntu, or suse software)
Windows 3.1
(same as Windows 3.1.1)
previous Non NT based oses than 3.1
(highly irrelevant to you i would assume)