First we define the notion of an outer measure L*, which is a very intuitive generalization of the length of an interval. The outer measure of a set S in R is the inf over all collections of intervals covering S of the total length of those intervals.
Then we define the Lebesgue measure L by restricting the domain of L* to sets that we call measurable:
A set E is said Lebesgue measurable if for any set A, we have
L*(A)=L*(AE)+L*(AE^c)
This strange looking condition is a more practical characterizations due to Carathéodory of the notion of measurability introduced by Lebesgue. In either case, the condition is there to insure that the measure L will be additive. I.e. for A, B disjoint, L(AuB)=L(A)+L(B). Actually, almost all sets are measurable, and to construct one that isn't, you must make explicit use of the axiom of choice. If we work with a set theory without the axiom of choice, all sets are Lebesgue-measurable.
And a function is measurable if the preimage of any interval is a meaurable set.