How to add .current class into menu link when page is being viewed
If you create a new menu and make it a block then it will set a class called "active" when you are on the current page. You will also get a class called "active-trail" for each parent item. If you want to create something more custom then you can check and see if the url matches the link you are building.

You can see here how the menu is being built to get some ideas:

https://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_tree_output/7

If you want to do something custom then you will need to compare $_GET['q'] to the link that you are building in order to set an active class.

I am pretty sure you can also use theme_item list and the active class will be set:

https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_item_list/7