Units are pascal way of expressing namespaces, nothing more, nothing less. They're supposed to sandbox their function/variable names in theory, however in pascalscript it doesn't happen because unit syntax support is experimental. So they're mearly for grouping stuff.
As for your questions about objects: No, you can't define your own classes in PS if that's what you wanted to ask. I can define classes as API types, but it's not possible for script to define it's own. You can create objects of classes defined in API though, assuming you can access constructor. (i.e. you can create TNewPlayer instances).