The sacrifice bunt is a staple of the game. The batters job is to advance the base runner, and offer himself as the out. The idea is to put the ball near the base line in fair territory, and to not allow the defense to make a play on the advancing runner. There is usually no element of surprise and the defense is fully aware of the intent. The bunt must be down, and to either the first or third base side. A pop-up bunt is the worst, since it will be a potential double play.  Here is a good instructional video on how to execute this technique.