Ok,
an index just makes your searches faster and improves your database performance when searching in big tables. Unique is usefull, when you what to make sure, that the values in the colums, or the combination of values from diffrent rows are unique as well, e.g. the username or email. The primary key identifies each row in a table, e.g. the usrid or personalid of an employee. E.g. the combination of forename,surname,street,streetnumber,zip,city and country would identify a person, but this key would be to big in an seach clause. You would always have to perform a searches where you have to aks for all these criterias. For that reason you normaly invent the abstract primary key "personid" or how ever you will call it.
To explain the whole thing would take to much time. If you want to have more information about it, search for database normalization at google or your prefered search engine.
About the visibilty of the primary key: Sometimes you need links like ?...&someprimarykey=valueforthiskey.
If the key is the username you have the problem, that you bring the username to the frontent(browser). The links an data are normally cached on the client computer, so the username in your links will be cached also. If the user, that username belongs, logs out and leaves the computer how it is, the follwing person could read the username just out of the link and probably, if the first one has choosen an very password, log into your system. For that reason you should prevent in first line to show primary keys in the frontent. E.g. using Sessions. But if you can't prevent, it try to never show information that can be used directly on your site(Login,etc.). For that reason you should use the userid instead of the username in links and therefore you need the an additional primary key for an user.
silver...