With a KOMA-Script class this can be done without a package for header and footer. You only have to redefine the KOMA-Script command \pagemark
:
\documentclass[12pt]{scrartcl}
\usepackage{blindtext}
\usepackage{lastpage}
\renewcommand\pagemark{{\usekomafont{pagenumber}\thepage\ of \pageref{LastPage}}}
\author{Author}
\title{Title}
\begin{document}
\maketitle
\section{Testing}
\blinddocument
\end{document}

It is also possible to add lines below the header and above the footer. If you set pagestyle headings
you will get the sections in header.
\documentclass[12pt,
headsepline,footsepline% <- added
]{scrartcl}
\usepackage{blindtext}
\usepackage{lastpage}
\renewcommand\pagemark{{\usekomafont{pagenumber}\thepage\ of \pageref{LastPage}}}
\pagestyle{headings}% <- added
\author{Author}
\title{Title}
\begin{document}
\maketitle
\section{Testing}
\blinddocument
\end{document}

If you want to customize header and footer, you can use package scrlayer-scrpage
which is part of the KOMA-Script bundle:
\documentclass[12pt]{scrartcl}
\usepackage{blindtext}
\usepackage{lastpage}
\renewcommand\pagemark{{\usekomafont{pagenumber}\thepage\ of \pageref{LastPage}}}
\usepackage{scrlayer-scrpage}% sets pagestyle scrheadings automatically
\clearpairofpagestyles
\ohead{\headmark}
\ofoot*{\pagemark}
\author{Author}
\title{Title}
\begin{document}
\maketitle
\section{Testing}
\blinddocument
\end{document}
The starred version of \ofoot
sets the entry for both scrheadings
and plain
.
