This paper deals with the problem of joint sensing and medium accessing in cognitive radio networks. We design a non-cooperative two-step game to describe the Sense-Transmit-Wait paradigm in an opportunistic point of view. We give a full characterization of the Nash equilibria and analyze the optimal pricing policy, from the network owner view, for both centralized setting and decentralized setting. Next, we propose a combined learning algorithm that is fully distributed and allows the cognitive users to learn their optimal payoffs and their optimal strategies in both symmetric and asymmetric cases. The derived results are illustrated by numerical results and provide some insights on how to deploy cognitive radios in medium access cognitive radio networks in terms of sensing capabilities.