Actions or APIs?

Hello guys,
I am currently doing the MVC tutorial of Mosh.
I dont understand when to use APIs and when Actions?
I know that APIs send data and this is necessary to display the application on various devices. And this is also required if another application wants to use the data.
But beside that? If for example I develop an application for computer webbrowser and no external application requests my data?
Can somebody explain please?
Thank you in advance

So some things I have found work better in specific ways.

For example I have about 36,000 records for contacts coming into a DataTable. If I have to pass it all as a Action/Controller then it takes a while for the entire page to load as it need to transfer all 36,000 records. However if I pass it the base model, then I use javascript Ajax to call/retrieve the api for those contacts then the Datatable will saying loading… then complete.

For me currently it seems to be mainly user experiences since ajax will not hault the page from loading.

I have also done things like hide the tables I am loading so that the user doesn’t seem them all once they load the page and can un-hide the specific table they want to see. By that time the table has loaded all the content I needed it to load.

Just so you know I had the same questions when I working through it all as well. I only recently figured out which I prefer for what reasons.