A professional baseball player swings his bat in an attempt to hit an oncoming baseball .