You are correct that the
Scanning and Detecting 3D Objects page offers sample code for a project that, once loaded on your iOS/iPadOS device, can scan and capture objects. Once scanned, the objects are saved to your desired destination in the .arobject file format. The saved .arobject file can then be added to your Xcode project, and you can configure your ARSession to load the .arobject (or multiple AR objects, if you plan to have your app detect more than one object), which will serve as a reference for object detection. That’s the high-level overview; the Scanning and Detecting 3D Objects page has great documentation on how to use the sample object scanning app, once it’s loaded on your device, and how to add the .arobject into your project/setup the code to make use of the file.
Alternatively, Reality Composer (available as a download from the App Store for iOS/iPadOS) includes this same functionality, with regards to scanning an object, which can then serve as the anchor to show 3D content in AR, once the scanned object is seen by your user. I would venture to say that the sample project you referenced in your post is a bit more manual, but gives you more control over the entire workflow, whereas Reality Composer simplifies the process.
Along those lines, if you opt to use the sample project you referenced, you will be adding your 3D content directly into your Xcode project, and you will be responsible for handling the code to add that 3D content to your scene once your object is recognized. With Reality Composer, you will be adding your 3D content into Reality Composer, which will give you the opportunity to more visually preview what the 3D content looks like in contrast to the scanned object. You can learn more about working with Reality Composer in the
Creating 3D Content with Reality Composer documentation.
If your question was, more directly, asking how to load the code Apple provides onto a device, you will want to download the sample code, launch the .xcodeproj to open Xcode, set the proper profile to allow the app to be signed with your Apple Developer account, and run on a device. Again, a high-level overview, but I would have a look at the
Running Your App in the Simulator or on a Device documentation (in your case, you’d be running the project on a device, not the Simulator, which is detailed in that documentation; the Simulator does not have support for ARKit).