Will Durant wrote it, not Aristotle. The sentence is in Durant's The Story of Philosophy (1926), in a passage explaining Aristotle's Nicomachean Ethics. Durant quotes Aristotle on either side of it, and his own summary in between was later read as Aristotle's words.
What it means
Character is built by repetition. We do not do good things because we are already good; we become good by doing them, again and again, until they are part of who we are.
Where it comes from
As Snopes and Wikiquote give it, Durant's passage runs: “Excellence is an art won by training and habituation: we do not act rightly because we have virtue or excellence, but we rather have these because we have acted rightly; ‘these virtues are formed in man by his doing the actions’; we are what we repeatedly do. Excellence, then, is not an act but a habit.” The words in single quotation marks are Aristotle's, as Durant translated them; the famous sentence is Durant's.
The idea is Aristotle's. In Book II of the Nicomachean Ethics he argues that virtues are acquired by practice, like a craft: “men come to be builders, for instance, by building; harp-players, by playing on the harp: exactly so, by doing just actions we come to be just; by doing the actions of self-mastery we come to be perfected in self-mastery; and by doing brave actions brave.” Durant's line is a good summary of that argument, which is probably why it was so easily mistaken for it.