What things can affect to get pregnant?

Does drink beer or smoke affect to get pregnant?