Binary systems are very common among field stars, yet the vast majority of known exoplanets have been detected around single stars. While this relatively small number of planets in binaries is probably partly due to strong observational biases, there is, however, statistical evidence that planets are indeed less frequent in binaries with separations smaller than 100 au, strongly suggesting that the presence of a close-in companion star has an adverse effect on planet formation. It is indeed possible for the gravitational pull of the second star to affect all the different stages of planet formation, from proto-planetary disk formation to dust accumulation into planetesimals, to the accretion of these planetesimals into large planetary embryos and, eventually, the final growth of these embryos into planets. For the crucial planetesimal-accretion phase, the complex coupling between dynamical perturbations from the binary and friction due to gas in the proto-planetary disk suggests that planetesimal accretion might be hampered due to increased, accretion-hostile impact velocities. Likewise, the interplay between the binary's secular perturbations and mean motion resonances lead to unstable regions, where not only planet formation is inhibited, but where a massive body would be ejected from the system on a hyperbolic orbit. The amplitude of these two main effects is different for S-and P-type planets, so that a comparison between the two populations might outline the influence of the companion star on the planet formation process. Unfortunately, at present the two populations (circumstellar or circumbinary) are not known equally well and different biases and uncertainties prevent a quantitative comparison. We also highlight the long-term dynamical evolution of both S and P-type systems and focus on how these different evolutions influence the final architecture of planetary systems in binaries.We will focus here on the main characteristics of planets in both S and P-type orbital configurations which significantly differ in terms of perturbations by the companion star. In the S-type configuration, where planets orbit one of the star of the system, the most critical regions for planet formation are the outer ones where the gravity of the second star may excite large eccentricities, potentially leading to instability via resonance superposition and, in case of orbital misalignment, may also be involved in fast Kozai cycles with large eccentricity/inclination variations. The inner regions of the circumstellar disk appears then most promising for a 'regular' core-accretion growth of planets and for subsequent stable orbital behavior. In the case of P-type configurations, where the planets orbit around both stars, perturbations are the strongest in the inner regions close to the central binary. In this configuration, instability is expected close to the center of the system, while planet formation should safely occur in the outer regions of the circumbinary disk. In this case, planet migration may play a major role in brin...