We consider a basic problem in unsupervised learning: learning an unknown Poisson binomial distribution. A Poisson binomial distribution (PBD) over TeX is the distribution of a sum of TeX independent Bernoulli random variables which may have arbitrary, potentially non-equal, expectations. These distributions were first studied by Poisson (Recherches sur la Probabilitè des jugements en matié criminelle et en matiére civile. Bachelier, Paris, 1837) and are a natural TeX -parameter generalization of the familiar Binomial Distribution. Surprisingly, prior to our work this basic learning problem was poorly understood, and known results for it were far from optimal. We essentially settle the complexity of the learning problem for this basic class of distributions. As our first main result we give a highly efficient algorithm which learns to TeX -accuracy (with respect to the total variation distance) using TeX samples independent of TeX . The running time of the algorithm is quasilinear in the size of its input data, i.e., TeX bit-operations (we write TeX to hide factors which are polylogarithmic in the argument to TeX ; thus, for example, TeX denotes a quantity which is TeX for some absolute constant TeX . Observe that each draw from the distribution is a TeX -bit string). Our second main result is a proper learning algorithm that learns to TeX -accuracy using TeX samples, and runs in time TeX . This sample complexity is nearly optimal, since any algorithm for this problem must use TeX samples. We also give positive and negative results for some extensions of this learning problem to weighted sums of independent Bernoulli random variables.