Using newer APIs and the like. Also actually properly fitting to the new screens vs. being stretched out or zoomed in in some fashion by what Apple does by default.
2 main things. Extensions need to be made to add the new sharing capability. Another thing is to get native resolution vs scaling apps. I can tell you, scaling apps on my 6+ makes things huge. Once optimized, the text is super crisp and matches the rest of the system.
If an app says that it's optimized for iOS 8 then it means that it uses the new iOS 8 API's and this has nothing to do with whether the app scales on the iPhone 6 or 6 plus.
Apps can also say "Optimized for the iPhone 6 and 6 plus". If you see this, then you know that the app will not scale and is designed to work with the native resolution on the bigger phones.