It will be on sale soon. Here is the site for Chinese residents (for English, click on English under the Beijing2008 icon), including people originally not from mainland China but are currenly living inside China. For foreigners live outside of China, they need to contact the Olympics Committes of their respective country (region). Here is the eligibility and ID requirements (Click on English if necessary).
Thinking about getting the ticket for opening ceremony? The ticket ranges from CNY 200 to CNY 5,000. But I think it will be more or less like a lottery draw considering China has 1.3 billion people 🙂