Gαs, on dissociation from an activated GPCR, binds to adenylyl cyclase, allowing adenylyl cyclase to become catalytically active. This allows adenylyl cyclase to catalyse the conversion of ATP to cAMP. As it is possible for adenylyl cyclase to produce many cAMP molecules, cAMP can act as a second messenger.
cAMP is able to bind to other molecules in the cell to activate them, allowing the cascade of signalling through the cell. It is, therefore, a second messenger.