Sighting in the laser is easy. Here's a couple of things you need to know first because it may make a difference where you hit on the target. I'll use two examples in a Glock.
1. The two most popular lasers for the Glock are the LaserMax that replaces the recoil spring rod in the Glock (beneath the barrel), and the Crimson Trace Corporation's Lasergrips that attach to the outside of the pistol grip with a pin with the laser offset to the right alongside the slide.
2. Lasers on pistols should be targeted at 25 to 50 feet because that's the normal engagement range with the shorter the norm [stats show that pistol engagement ranges are 21 feet or less] On LaserMax under barrel laser, the line of sight for the laser and the line of bore for the barrel are the same. The only error that comes in is elevation because both are arranged in the same vertical plane. The Lasergrip you have parallax to consider. The line of bore of the barrel and the line of sight of the laser are offset to the right side. That means that there will be a windage error on either side of the range the laser is targeted (and there is also some elevation error).
Example (I have exaggerated things to make the point): You've sighted the windage and elevation intersection of the line of bore and line of sight for the laser at 50 feet. At 25 feet, the strike of the bullet will be to the left of the laser dot; at 75 feet it will be to the right of the dot. This is an exaggeation of what parallax is. For a pistol at these ranges, the actual difference is non-existent.
The fastest way to target a laser on a pistol is to get a laser boresight. You can use one that mounts in the pistol bore on an expanding arbor from the front or use one that goes in the chamber like AccuShot. The AccuShot is a small laser about the size of a 9mm Luger round that comes with a .40 S&W adapter sleeve. You stick the AccuShot in the barrel and that gives you the line of the bore. You go to the sight-in range (say 25 feet), and then turn on the LaserMax or Lasergirp. Then make whatever changes are necessary to the windage and elevation screws that are requied to bring the dots together. In the case of the LaserMax, you probably won't have to do anything because of the sighting plane. In the case of the Lasergrips, you will definitely have to make adjustments.
That's all there is to it. Nothing fancy or elaborate. The AccuShot and adapter sleeves are usually available at reasonable prices by doing a Google search. The laser itself is powered by three No. 317 batteries about the size of hearing aid batteries.