There have been two men in recent history who have managed to play both professional baseball and professional football at the same time. Deon Sanders and Bo Jackson.
At the most basic, the baseball and football seasons don't overlap very much. Football's preseason and early season does overlap somewhat with baseball's late and post season, and players will have to make a choice between which sport they play during that time (as it would be difficult to be in two places at once to be able to practice with your football team and keep a nightly baseball schedule). However, if you don't practice with the football team (and the team is OK with that), you can in theory play baseball during the week and play football on Sunday, only missing the Sunday (and maybe Saturday or Monday) baseball games.
This requires a great deal of good will from both your NFL and MLB teams (and obviously sufficient star power in both sports for them to be willing to let you have this much flexibility).
This is something that both Sanders and Jackson shared, both were very good at both sports to the extent that teams were willing to let them do both even though they had to sacrifice a roster spot to a player who would not be there 100% of the time.
However, this kind of schedule takes a toll. Sanders eventually chose football, Jackson eventually chose baseball.