The world of string classes is divided into two parallel hierarchies. One for one-byte data-structures (e.g., nsACString) and one for two-byte data-structures (e.g., nsAString). The top of the hierarchy is nsAString. discuss the relationship of nsAString to "What is a string?".
There are two other important abstract classes just below nsAString:
nsASingleFragmentString
nsAFlatString
These abstract classes, and nsAString most of all, primarily appear in APIs. In your APIs, you will usually want to use nsAString unless you have a convincing argument for something more specific.