Here is a picture of it in action:
This currently works on the Google Search App version 2.8+ for Android 4.1+, and in mobile browsers on Android if the user is signed in. Plus, Google is only testing this with a select number of publishers. If you want to be included in this test, fill out this form.
Technically, to get this working, you need to configure both your website and your app to define the relationships between them. This is done by:
(1) Annotating app links for each page on your website (or through sitemap) that can be opened in your app to specify how the page’s content can be opened in the app.
(2) Adding intent filters for deep linking in your app manifest to specify how to reach specific content inside your app.