How should I set up this pagination

Generally these are URL variables and interpreted by the backend. Another way of writing this would be:

www.codefundamentals.com/blog?page=2

It looks like you’re using PHP, so you’d want to do URL rewriting and pick up the variables with $_GET['page'] then use that id to pull it from your db. Since it doesn’t look like you’re using a CMS, you could do this pretty much any way you wanted.

You could set this up fairly easily in something like WordPress and I think this style is default.