Long winded answer, and my take on what's happening.

Basically, the ui's job is to continuously redraw the screen and wait for touches, which the code you write responds too. The ui is an infinite loop of code initiated when you call view.present()

In the loop, the underlying machinery of the ui looks for indications it needs to interact with the user.

For the view and of its subviews, it calls the view's draw() method which renders that view's image. Other than custom views, you don't worry about draw().

If a the view is a TableView and its had its reload_data() method called, the visible "cells" are redrawn with the new contents of their (or their delegate's) items attribute. When a cell is to be rendered for such a list, it's tableview_cell_for_row() method handles the cell-by-cell details. This is why, by knowing what cell its rendering, you can manipulate each cell differently.

If the views are "touch" active (buttons usually), then the view's action is called, and is passed the object (the button) as an argument. The action (call-back) can then service the touch.

For a list view, if you touch a cell, the TableView delegate's did_select() is called. Touches accumulate in a list and are processed first-in, last out.

Much more, hopefully that gets you started. Happy coding.