Xcode is Apple's Integrated Development Environment (IDE) for building apps for the apple platform, such as iOS, macOS, Apple watch, or Apple TV. It’s main features are a code editor for Swift and Objective C, a What-you-see-is-what-you-get (WYSIWYG) editor for designing app interfaces with the Cocoa touch UI framework, and a full-fledged iPhone simulator for testing your apps.
It is isn't impossible to write iPhone Apps without XCode, but it is so much more difficult that it may as well be. If you want to build anything for apple products, you'll want to learn XCode. Since it only runs on a mac, that means you'll need one of those as well. Hooray for walled gardens!