When it comes to biology, the answer is typically: It's complicated. I'll give two examples, melanin and the gene for vitamin-C.
The process to make melanin is a bit complex, but suffice to say the chemical is produced. From there, it is used in at least two way you are probably familiar with: sleep and tanning. Our bodies uses melanin production to help regulate our sleep cycle. Also, through the quirks of evolution, we use it to help stop UV radiation and keep our skin safe. At the end of the day, a complex process that includes a few genes maps to multiple functions.
The gene for vitamin-C production is another example. In humans, some primates, and guinea pigs, this one gene is mutated. As such, we can't produce vitamin-C internally and we have to get it from our diet. This single gene had a function in our ancestors, but no longer does. I think you can argue that it's lack of function is a psuedo-function for our ancestors to eat more fruits, but I don't really buy that. Evolutionary, we would be better off with the non-mutated gene than with what we got now (ask any scurvy survivor or Inuit).
Generally, I'd say that most of the genes in our code are more like the mutated vitamin-C gene than the melanin ones. They had specific functions sometime in our history, but no longer do. Kinda like a vestigial organ or the eyes of a cave fish.