We present a theoretical study based upon quantum Monte Carlo methods of the Bose polaron in one-dimensional systems with contact interactions. In this instance of the problem of a single impurity immersed in a quantum bath, the medium is a Lieb-Liniger gas of bosons ranging from the weakly interacting to the Tonks-Girardeau regime, whereas the impurity is coupled to the bath via a different contact potential producing both repulsive and attractive interactions. Both the case of a mobile impurity, having the same mass as the particles in the medium, and of a static impurity with infinite mass are considered. We make use of exact numerical techniques that allow us to calculate the ground-state energy of the impurity, its effective mass as well as the contact parameter between the impurity and the bath. These quantities are investigated as a function of the strength of interactions between the impurity and the bath and within the bath. In particular, we find that the effective mass rapidly increases to very large values when the impurity gets strongly coupled to an otherwise weakly repulsive bath. This heavy impurity hardly moves within the medium, thereby realizing the self-localization regime of the Landau-Pekar polaron. Furthermore, we compare our results with predictions of perturbation theory valid for weak interactions and with exact solutions available when the bosons in the medium behave as impenetrable particles.