How Magento's controller action which is C from MVC, Block-Layout-Template which is V from MVC and Collections-Helpers which is M from MVC work together to show custom data from a mysql table. It's a confusing concept for someone who is new to magento. Any help would be appreciated. Thanks.
You have to clear below points to understand well MVC format of Magento how works.
Basic understanding of mvc pattern in magento:
MVC stand for model-view-controller.
In magento controller acts as C of MVC. All url action management are execute here. This is the entry point for each request.
Block/Templates/Layout acts as V of MVC pattern.
All frontend data render and display of content goes here using xml and phtml files with call view files function inside Block.php file.
Model files acts as M of MVC pattern.
All Business related logics for any modules are process here. E.g. CRUD method of module are done here in model file.
Model files are used to define custom table relations and used for set-get collections. Modules afterSave , beforeSave, afterLoad , beforeLoad logic are defined inside models collection file.
Just example Customer account save logic are process here plus any customer add,delete or update information logic goes to model file.
In magento 1 sql folder are used to create database table, upgrade existing table schema.
Magento 2 Table defination/declaration and table upgrade related data are defined under Setup folder and remove sql folder concept.
Helper files in magento are used to define site specific global common functions.
As per define in above answer link tou can start more MVC patter in details.
Hope this will help you understand MVC pattern in magento.
Here is document link for Magento 1.