We propose a mechanism to pin skyrmions in chiral magnets by introducing local maximum of magnetic exchange strength, which can be realized in chiral magnetic thin films by engineering the local density of itinerate electrons. Thus we find a way to artificially control the position of a single skyrmion in chiral magnetic thin films. The stationary properties and the dynamical pinning and depinning processes of an isolated skyrmion around a pinning center are studied. We do a series of simulations to show that the critical current to depin a skyrmion has linearly dependence on the pinning strength. We also estimate the critical current to have order of magnitude 10^{7}sim10^{8}A/m^{2} .