The ancient Greek Philosophers such as Socrates, Plato and Aristotle studied the traditional ethics of their society and came up with a set of virtues or habits of character that were pretty much universally agreed upon. In Hellas, virtue or arete meant excellence, especially excellence regarding the end or goal of a thing. The excellence of a knife is the cutting and how well it did that. The excellence of a human being is the fulfilling of a human's end or goal. So they looked at what characteristics made someone excellent in their society. The first listing of these were in some early Platonic Dialogues, where Plato recreates some of the debates that his teacher Socrates participated. Laches discussed Courage (andreia), Charmides discussed Temperance (sophrosune), Euthyphro discussed Piety (Eusebia). Later, in the Republic, Plato analyses Justice (dikaiosune), and the whole point of the dialogues was to discover Wisdom (sophia). Those are the five cardinal virtues of the ancient world, at base. The Republic also goes into detail about how Justice is the product of balancing the three parts of the soul (appetitive, spirited, and reason, each with its particular virtue, i.e., temperance, courage, and wisdom) to produce virtue.
Those four, temperance, courage, wisdom and justice become the Four Cardinal or Philosophical Virtues, which are adopted by Cicero and the Stoics as part of their ethical system. From there they are adopted by St. Augustine and others, and to which are added the Three Theological Virtues (faith, hope and charity from St. Paul's first letter to the Corinthians) to form the Seven Cardinal Virtues, which are contrasted to the Seven Deadly Sins (discussed in the movie Seven).
Plato's student, Aristotle looked into and discussed virtues in more detail with his Nichomachean Ethics. There he discusses what the ends of ethics are, and concludes it is happiness or flourishing (depending on how one translates eudaimonia -- literally "good spiritedness"). In examining the traditional ethics of the time he concludes that virtue is a mean between two extremes, an excess and deficiency. Virtues are also a type of habit and must be incurred from a young age, as one follows role models, advice and actually doing the actions associated with these character traits.
A full list of his virtues and vices can be found here and here. A quick perusal would show that some virtues of that time are strange to us. Such as Pride...Bertrand Russell once noted that the passage about the Proud (the megalopsuchic or "great souled" man) made him shudder. Despite his humanism and atheism, 2000 years of Christianity had permeated his consciousness. Note this is proper pride, pride in one's character and accomplishment, not mere boastfulness, which is an excess and a vice (hubris or overweening pride). The Christian virtue of humility is a vice, a deficiency. In ancient Greece one expected to have one's achievements acknowledged fairly...and ignoring or downplaying anothers achievements could lead to revenge. Kaufman in his Nietzsche: Philosopher, Psychologist, Antichrist points to the similarity of proper pride to elements of Nietzsche's Overman, and argues for an Aristotelian influence, along with extended quotes from the Nichomachean Ethics.
Interestingly, Aristotle divides wisdom into an intellectual virtue (sophia) and a practical virtue, phronesis or practical wisdom. Phronesis is the proper matching of means to ends, and could result, in itself in attaining and summarizing the other virtues. Seneca certainly thought so.
Aristotle also acknowledges that one could fail to fulfill a virtue, despite knowing it is the good, due to a lack of will (acrasia). As St. Paul said, "the spirit is willing, but the flesh is weak." This distinguished him from Plato and Socrates who felt that no one knowingly did the wrong or bad. (The Socratic paradox). On the other hand, Plato realized that virtues of the Aristotelian sort, being habitual tend to fall apart in non-habitual situations.
To use an archery example, the incontinent or weak willed man is like an archer who knows the mark but fails to hit it due to being overcome by, say, pleasure...and the intemperate man who intentionally seeks excess pleasure. The interesting modern, Christianized meaning of temperance is total abstinence. (The Women's Temperance League sought not moderate alcohol consumption but no alcohol consumption at all). The Greeks acknowledged that some indulgence is a good thing, but going too far is a bad idea.
Aristotle's concept of the Golden Mean as virtue expresses a common value of Hellenic society, the sense of the importance of balance and moderation. Apollo(n) was thought to have granted this concept to the Greeks as one of the Delphic Maxims: meden agan (nothing too much or nothing to excess, alternately everything in moderation). This sense of balance and moderation was highly esteemed by the Hellenes. It permeates the ethical structure of Aristotle's thought and even his political thought (in his Politics Aristotle discusses the need for a large middle class to moderate the destabilizing influences of the rich [oligarchy] and the poor [democracy], as well as the need to form a mixed and balanced constitution [politeia], where he presaged Polybius' discussions of the mixed constiutions or republics of Lakedaimonia and Roma).
Now one thing that will also strike the modern reader as odd, is the lack of moral rules, anything like the Decalogue, Golden Rule or the Kantian Categorical Imperative (or the Wiccan Rede). Nor is there much concern for actions and consequences, such as Utilitarianism. In other words deontological and (modern) teleological ethics didn't exist. Rather there is a focus on education and character. Education takes up most of the Republic and good chunks of The Nichomachean Ethics and The Politics. If one develops a good character, then one will act rightly without the need to reference rules. At most, one would use maxims and rules of thumb...which is the characteristic of most non-Philosophical ethical texts surviving, such as the Delphic Maxims, Solon's Precepts, or the Golden Verses of Pythagoras. Take a look at Dr. Kelley's discussion of base, means and ends here: Key. See his section on aretaic judgments.
Indeed, in the first book of the Republic Socrates (i.e., Plato) shows the limiations of rule based ethics by examining some rules of thumb that other participants provide in answer to the question of what is justice. Context and situation play a role here.
One would also be surprised by the focus on the Good, including of the individual. Happiness is one's goal, essentially with Aristotle and his successors. The Stoics essentially borrowed large chunks of Aristotle and focused on virtue being its own reward, and how it will lead to apatheia (apathy, or passionlessness) and peace/happiness (ataraxia). This seems to make it a form of ethical egoism. Yet its not entirely self-centered, as concern for and benefits to others fit in well. Some have taken to calling classical ethics "classical egoism" as opposed to both modern ethical and psychological egoism and altruism. It is also not surprising that a modern egoist ethicist such as Ayn Rand explicitly acknowledges the influence of Aristotle on her thinking, and lays out a series of virtues to serve as her philosophy's ethics.
She's not the only one. Dissatisfaction with traditional modern ethical theories of deontological and teleological ethics has led to the aretaic turn in modern ethics and an upswing in interest in virtue ethics even outside of Roman Catholicism where it has always been the standard ethical theory since St. Thomas Aquinas' sythesis of Aristotle and Christianity; and the English Public School System. ;).
Note, since these ethics focus on the end or goal of human existence, they are often called teleological. However to avoid confusion with utilitariaism, scholars prefer eudaimonistic or aretaic as a nomenaclature.
The text of The Nichomachean Ethics is available here