If you alt-click on the method in Xcode it will tell you what it does.
This specific method returns a CGSize (struct with two fields - width and height) that is getting calculated by NSString (text in your label) for specific font and limited length.
For example you want to know how big will your label be in order to position other elements on screen. This method helps you since it returns the size that said label will occupy.
The method to replace this is boundingRectWithSize:options:attributes:context: that does the same thing