The great advances in observational cosmology in the last few years have delivered us an unprecedented amount of new data. They begin to indicate with confidence that in the past our universe underwent a phase of acceleration, called inflation, and that it is currently undergoing a similar phase, usually thought of as a consequence of a cosmological constant. I will show how inflation can be probed, using to this purpose a very general effective field theory description. In particular, I will concentrate on the new and powerful signal of the non-gaussianity of the primordial density perturbations, explaining its theoretical motivation, the techniques to look for it in the data, and the current constraints from the WMAP experiment. This signature is very important not only to identify the precise mechanism that drove inflation, but also to shed light on possible alternatives, such as the recently proposed bouncing cosmology. I will describe how these alternative theories can be consistently formulated and be predictive, and how similar theories may have interesting implications for the current acceleration of the universe. If inflation happened in our past, it might actually have been eternal. The presence of such a phase offers a new way to address the problem of the cosmological constant and of the current acceleration of the universe. This will lead us to explain in precise terms what eternal inflation is.