Xcode is an integrated development environment (IDE) for macOS containing a suite of software development tools developed by Apple for developing software for macOS, iOS, watchOS, and tvOS.
First released in 2003, the latest stable release is version 9.4 and is available via the Mac App Store free of charge for macOS High Sierra users.
Registered developers can download preview releases and prior versions of the suite through the Apple Developer website.
Follow below steps to download and install Xcode on MacOS High Sierra 10
1. Follow this link
2. Click on View in Mac App Store
3. Click on Get button
4. Click on Install App
Installation Done! you can launch Xcode from Application folder.
Note: It may ask for your App Store user name and password. If you are getting some review related popup you need to enter your billing and shipping information in App Store account.