Both words have been defined in several ways. So please understand that my simple definitions will not cover everything.
Generally speaking, a Baptist is one who believes in certain Baptist distinctives. A Baptist holds to believer's baptism (not possible of infants), baptism by immersion, freedom of conscience for the soul, a church made up of true believers (as much as can be known), and the absolute authority of scripture. If these distinctives seem quite common today, it is because of the influence Baptists have had--especially in America. Many groups today hold to many of the Baptist distinctives while not calling themselves Baptists. But that is another story.
An Anabaptist is by definition a re-baptizer. Baptists of earlier times denied that they rebaptized. They simply stated that the earlier experience that some church called baptism was not baptism at all. Historically, many peoples have been called Anabaptists. However, the group that is usually called such in the history books of today are said to have originated in Switzerland in the early 1500's. They were confederates of the reformer Zwingli and when he balked at baptism by immersion, they went on to more biblical Christianity. They were much persecuted and many died for the faith. Also, the majority of them believed in the Baptist distinctives.
Connections between the Baptists and Anabaptists is a much-argued subject and many, many books have been written about this. The most obvious extension of the 16th century Anabaptists are the Mennonites and their related groups (like the Amish). There are evidences of Anabaptist influence on the 17th century English Baptists, but most modern scholars deny any direct connection. I believe that the influence was probably more than is generally allowed today.
However, the Anabaptists tended toward some beliefs that are not common among Baptists today. As a result of their persecution, they were totally opposed to any participation in government: no belonging to public office, etc. They were also against Christians participating in war. Some of them leaned toward baptismal regeneration and they were Armenian in theology. All of these tendencies can be seen in certain Mennonite groups today. They have a great heritage, but in some areas I would not be able to go along with them.
These are huge subjects but I hope this has given you a place to start.