It chains these method calls, which is why this is called method chaining.
The first thing that gets executed is object.method1(). This returns some object, which might be a reference to object (i.e., method1() might end with return *this;), or it might be some other object. Let's call the returned object objectB. Then objectB becomes the this object of method2().
The most common use of method chaining is in the iostream library. E.g., cout << x << y works because cout << x is a function that returns cout.
Just keep the life time of the objects involved in mind when you are doing this. Most of the time it will be scenarios like what has been listed and so it won't matter, but stuff like this:
Is generally a bad idea since the intermediate object would be destroyed and that would make hSubObject invalid (assuming the sub object has a destructor).