This is a pretty good explainer by the RNC about how the convention, the balloting, delegate selection, and so forth works.
Note, though how the video subtly suggests: Second ballot? no big deal! It’s clear to everyone that the RNC and the rest of the Establishment is dreading a Trump candidacy. And to stop that, you need a second ballot.
That said, this does give you a good idea about how things go down.