By the official definition of the People's Republic of China, standard Mandarin uses:
1. The phonology or sound system of Beijing. A distinction should be made between the sound system of a dialect or language and the actual pronunciation of words in it. The pronunciations of words chosen for Standard Mandarin -- a standardized speech -- do not necessarily reproduce those of the Beijing dialect. The pronunciation of words is a standardization choice and occasional standardization differences (not accents) do exist, between Putonghua and Guoyu, for example.
In fluent speech, Chinese speakers can easily tell the difference between a speaker of the Beijing dialect and a speaker of Standard Mandarin. Beijingers speak Standard Mandarin with elements of their own dialect in the same way as other speakers.
2. The vocabulary of Mandarin dialects in general. This means that all slang and other elements deemed "regionalisms" are excluded. On the one hand, the vocabulary of all Chinese dialects, especially in more technical fields like science, law, and government, are very similar. (This is similar to the profusion of Latin and Greek words in European languages.) This means that much of the vocabulary of standardized Mandarin is shared with all varieties of Chinese. On the other hand, many colloquial vocabulary and slang found in Beijing dialect are not found in Standard Mandarin, and may not be understood by people not from Beijing.
3. The grammar and usage of exemplary modern Chinese literature, such as the work of Lu Xun, collectively known as "Vernacular Chinese". Vernacular Chinese, the standard written form of modern Chinese, is in turn based loosely upon a mixture of northern (predominant), southern, and classical grammar and usage. This gives formal standard Mandarin structure a slightly different feel from that of street Beijing dialect.
An example of Standard Mandarin versus the Beijing dialect would be: standard men (door) compared with Beijing men.
In theory the Republic of China defines standard Mandarin differently, though in reality the differences are minor and are concentrated mostly in the tones of a small minority of words.
Although Chinese speakers make a clear distinction between Standard Mandarin and the Beijing dialect, there are aspects of Beijing dialect that have made it into the official standard. Standard Mandarin has a T-V distinction between the polite and informal versions of you that comes from Beijing dialect. In addition, there is a distinction between "zánmen" (we including the listener) and "wǒmen" (we not including the listener). In practice, neither distinction is commonly used by most Chinese.