It's an unique string that identifies your app.
It is usually written in reverse DNS notation i.e (com.Yourcompanyname.yourApp).
Bundle Id which is configured in Xcode must be registered with Apple and be unique to your app.
Bundle IDs should be app specific (either iOS or macOS) and it can't be used for both iOS and macOS apps.
Bundle ID can be set in your project's target as follows
You can change the Bundle Identifier in Xcode by editing the project's info.plist.