In Java, and Object is a very abstract representation of data. "System" is a representation of the computer you're working on, "Socket" is a representation of a network connection, so on and so forth.
A "String" is an Object that represents words. For instance, everything I've typed could be represented as a "String". A "StringBuffer" is an Object much like a "String", but designed to be more efficient and faster, as the cost of flexibility. You need to do a little bit more work as a programmer to use StringBuffers, but your code will be faster as a result.
The "capactity" method is described in the Javadoc for StringBuffer, which can be found
here. I have a link to the API at the top of the Java forum here - I suggest you take a quick look there as it's very helpful to any Java programmer.