Aristotle's Nicomachean Ethics appears to be, like most of Aristotle's extant works, a set of lecture notes. The reason for the title is not entirely clear; the usual suggestions are that either Aristotle edited the notes and dedicated the work to his son Nicomachus, or Nicomachus is the one who edited the notes. The work is closely connected to Aristotle's Politics, and, indeed, it is important to understand that Aristotle's conception of 'ethics' is in some ways narrower than our usual conception of it: 'ethics' concerns the customary behavior of the civilized, that is, of the citizen actively occupying his proper place in his city. For instance, Aristotle's virtues (courage, temperance, liberality, munificence, and the like) are concerned with the character of a civilized person, and are always explained in those terms.
The Nicomachean Ethics is one of three major works in Aristotle's ethics, the other two being the Eudemian Ethics and the Magna Moralia. NE and EE are both generally recognized as authentic, while the authenticity of MM is disputed. EE shares three chapters in common with NE (EE chapter IV, V, and VI are identical to NE chapters V, VI, and VII); otherwise the relation among the works is quite unclear.
Chapters VIII and IX of the Nicomachean Ethics are concerned with friendship (philia). You can read them online in English at the Perseus Project.
Aporetic Method
Aristotle is often said to use an aporetic method, and his discussion of friendship is an excellent case in point. In an aporetic method, one begins with what is apparently true, based on common beliefs, the authority of wise and informed people, and the like. As one examines the apparent truths, however, puzzles (aporia) arise -- things that do not fit together properly. We then find a resolution to these puzzles that not only makes them fit together properly, but also, when common opinions turn out to be wrong, explains how these wrong opinions could have become common. We see this in Aristotle's discussion of friendship.
He starts with noting the common opinions and practices that indicate that friendship is important.
Then he notes some points of inconsistency and dispute in what people commonly believe about friendsihp.
He then analyzes friendship itself as way to begin to clarify these points of dispute: both what friendship seems to require, and what kinds of friendships there are. This enables him to start resolving some of the disputes.
Recognizing the features and kinds of friendship, however, raises additional puzzles, which he also begins to solve.
The result is not a discussion with simple organization, but it does end up being a very substantive and quite thorough discussion of the essential character of friendship; it is unsurprising that it has been one of the most influential discussions in Western philosophy.
Kinds of Friendship
Aristotle begins by noting a number of reasons why friendship is worthy of our attention: it is virtue or pertinent to virtue, it is necessary for genuine human life, and it is kalos (beautiful/fine/noble/splendid). There are a number of puzzles about friendship, however. One very obvious one is that some people say that friendship is based on similarity or likeness ('birds of a feather'), while others say that it is based on difference. In order to settle this question, Aristotle sets aside the common way most Greek philosophers tried to handle it, by identifying underlying cosmic principles, and suggests that one focus on actual human passions and character. If we focus on this, we get a number of key questions that we will want answered: What kinds of people make friends with each other, and what kinds of friendship are there?
To start this kind of classification, Aristotle looks at what it is for something to be lovable. Why do people love things? Some things are loved as good in themselves, and others as pleasant or useful. Not all kinds of love are friendship; you can love inanimate things, for instance, but this kind of love differs from what we take to be friendship because if you love wine (for instance), you don't wish good things for wine, whereas we do have this kind of goodwill for a friend. In addition, love of the inanimate is not mutual, but the goodwill in friendship is mutual and conscious. Given this, we can recognize that friendship, the kind of love involving conscious mutual goodwill, falls into three classes: friendships of excellence (virtue), friendships of use, and friendships of pleasure. Some people we love as friends because they are useful for us; others because they are pleasant to be with; and others because they are good in themselves. Aristotle thinks that older people are especially prone to form utility-friendships, and young people are especially prone to form pleasure-friendships; both of these kinds of friendships, however, are incidental and highly changeable. Virtue-friendships, on the other hand, are not incidental or easily changed, because the kind of goodwill involved with them is one in which you wish good for someone for their own sake, and not because they happen to be enjoyable or beneficial to you. They are also fully mutual, since both friends want fundamental goods for each other, and the degree to which friendships are mutual seems to have a significant effect on how durable the friendship itself is. Virtue-friendships are relatively rare, though; bad people cannot form them, and even good people have to work to cultivate them.
In general we tend to think of friendships as being among equals, but certain kinds of friendship among unequals are possible: father to son, elder to youth, and so forth. These by nature cannot be perfectly mutual, although, they can be made enduring if the two consistently fulfill their roles in a proportionate way. In all such cases, and, indeed, in friendship generally, the primary activity of the friendship is loving rather than being loved.
Friendship, Community, and Dispute
The two major things establishing a community (koinonia) are justice and friendship. Both of them have to do with common good, and while they are distinct, they do tend to support and require each other in various ways in the making of communities. This includes political or civil communities. Legislators tend to emphasize friendship, particularly utility-friendship, even more than justice. Because of this we can think of civic friendship in terms of the different kind of political systems: monarchy, aristocracy, polity, and their unjust counterparts, tyranny, oligarchy, and democracy. (Even in non-political communities, like families, there are analogues to these constitutions.) For obvious reasons, unjust constitutions sharply limit the capacity of the community for civic friendship.
Of the three kinds of friendship, utility-friendships are the ones most likely to break down into accusation and recrimination. Virtue-friendships are unlikely to do so because they involve love for persons themselves; even if one friend fails another, it will be recognized as accidental, and incidental to the friendship itself. Pleasure-friendships are unlikely to break down in this way because we tend not to accuse and reproach people merely for not pleasant enough, since we generally only spend as much time with pleasure-friends as pleases us. Utility-friendships, however, are protected from recrimination by neither of these: we are use-friends with those from whom we expect benefits, and there are any number of ways for us not to be getting the benefits that we think we should be getting. Like pleasure-friendships, utility-friendships can be very changeable, but we tend to be more entangled with them than we are with pleasure-friendships. Some utility-friendships, for instance, are contractual. Others are more matters of honor. In both cases, the change of the friendships requires definite consent on both sides. Pleasure-friends can just drift away from each other if things change; utility-friends generally cannot, and are likely to get disputatious and resentful if the friendship changes on them. While Aristotle doesn't elaborate much on the political ramifications of this, that it does have political ramifications is clear enough, since the primary structures of political communities as such are all utility-friendships. He does, however, explicitly note that it has bearing on who receives honor and recognition in a community.