You may change names with the following commands
\renewcommand{\figurename}{New Figure Caption Name}
\renewcommand{\figureautorefname}{New Figure Autoref Name}
\renewcommand{\listfigurename}{List of Figures Modifyed}
However, I would suggest to use \usepackage{listings} and then rename the captions with
\renewcommand{\lstlistingname}{Algorithm}
\renewcommand{\lstlistlistingname}{List of Algorithms}
And using the command \lstlistoflistings to insert the list of all listings.
This approach does not mix figures and others objects you might have in your work.
You may insert external code with
% firstline = 1, lastline = 10, firstnumber = 1, nolol,
\lstinputlisting[label = {alg:file_name}, caption = {Legenda}]
{file_name.m}
or copy and paste it internally with
\begin{lstlisting}
insert code here
\end{lstlisting}
You may find some more advice at How to put a list of code in appendix? and the links in it.