The president doesn't pass laws. Congress passes the laws, but the president is involved in the lawmaking process, too. That is why he can make all of those campaign promises while he is running for office. If elected, he will have the opportunity to influence the passage of many new laws.
How does the president affect what laws are passed? There are several things that he can do.
When a new president comes into office, he usually has an agenda in mind - new laws that he hopes to get passed in order to do the things that he has promised during his campaign. To get them introduced, the president may make speeches to Congress and also speeches to the public. In this way he gets people interested in passing his ideas into law. Because of his status as leader of the country, the president is in a unique position to get people to listen to his ideas and to act on them.