This post has been updated for 2019's new AppStore Connect and Xcode 10.
Here is a "short" guide for what to do:
In Apple's Member Center:
- log in using your developer account's AppleID
 
- navigate to Certificates, Identifiers & Profiles
 
- choose Certificates
 
- download / create iOS Certificates for iOS Distribution and iOS Development
 
- navigate to Provisioning Profiles
 
- download / create Provisioning Profiles for iOS Distribution and iOS Development
 
In AppStore Connect:
- log in using your developer account's AppleID
 
- navigate to My Apps
 
- in the top left corner press +
 
- fill in all the data it asks for
 
In Finder:
- navigate to your previously downloaded certificates and provisioning profiles
 
- double-click them
 
- enter passwords if necessary
 
- close KeyChain if it popped up
 
In Xcode:
- open your project
 
- in the top left corner tap on the project file
 
- under Identity set the version & build numbers
 
- for Signing, check Automatically manage signing
 
- ...then select your team as 
 
- select Generic iOS Device or a connected device under Schemes
 
- use cmdb to build your project
 
- in the status bar, find Product and select Archive. This will take a while to archive your project and eventually bring up the Archives section of xcode's Organizer
 
- click Disrtibute App
 
- follow the steps to complete the process. You should only have to press Next a few times. If everything goes well, the progress will say something like uploading binary.
 
- Wait until Xcode has successfully uploaded the binary to AppStore Connect. Then proceed with the steps below.
 
Back in AppStore Connect:
- log in using your developer account's AppleID
 
- navigate to My Apps
 
- select your app
 
- scroll down and find Build
 
- there it should show your build you just uploaded via Xcode, select it if necessary
- note that the build might not be selectable just yet. It needs to complete processing first. This usually takes about an hour.
 
 
- fill in all data required
- note If you want to manually release your app after it's reviewed select that option under Version Release, otherwise skip this
 
 
- next, press Submit For Review
 
- answer the questions they ask
 
...
- When the review is finished you can either release it manually to the AppStore or it will automatically do that depending on what you selected in step 6. 
- Review for new apps usually takes about a week, but it may vary. Updates will take a few days only
 
- After release its status will be Processing for App Store, that may take about half an hour
 
- The status will then change to Ready for Sale which effectively means, users can now download your app