A microscopic theory of spatial-temporal congested traffic patterns at highway bottlenecks due to on-ramps, merge bottlenecks (a reduction of highway lanes), and off-ramps is presented. The basic postulate of three-phase traffic theory is used, which claims that homogeneous (in space and time) model solutions (steady states) of synchronized flow cover a two dimensional region in the flow-density plane [B. S. Kerner, Phys. Rev. Lett. 81, 3797 (1998); Trans. Res. Rec. 1678, 160 (1999)]. Phase transitions leading to diverse congested patterns, pattern evolution, and pattern nonlinear features have been found. Diagrams of congested patterns, i.e., regions of the pattern emergence dependent on traffic demand, have been derived. Diverse effects of metastability with respect to the pattern formation have been found. The microscopic theory allows us to explain the main empirical pattern features at on-ramps and off-ramps which have recently been found [B. S. Kerner, Phys. Rev. E 65, 046138 (2002)]. (i) Rather than moving jams, synchronized flow first occurs at bottlenecks if the flow rate is slowly increasing. Wide moving jams can spontaneously occur only in synchronized flow. (ii) General patterns (GP) and synchronized flow patterns (SP) can spontaneously emerge at the bottlenecks. There can be the widening SP (WSP), the moving SP (MSP), and the localized SP. (iii) At on-ramps cases of "weak" and "strong" congestion should be distinguished. In contrast to weak congestion, under strong congestion the flow rate in synchronized flow in GP reaches a limit flow rate, the frequency of the moving jam emergence reaches a maximum, i.e., the GP characteristics under strong congestion do not depend on traffic demand. (iv) At the off-ramp GP with weak congestion occur. (v) A study of the pattern formation on a highway with two bottlenecks shows that diverse expanded patterns can occur, which cover both bottlenecks. SP first emerged at the downstream bottleneck can be caught at the upstream bottleneck (the catch effect). MSP, WSP, or wide moving jams first emerged at the downstream bottleneck induce diverse patterns at the upstream bottleneck. The onset of congestion at the upstream bottleneck can lead to an intensification of congestion at the downstream bottleneck. This causes a change in the pattern type and/or the pattern features.