Those numbers specify the downs, and yards to go.
In the NFL, when a team gains possession, they have 4 downs to gain 10 yards. Failure to do so results in the other team gaining possession from where the ball was at the end of those 4 downs. That's why you see punts and kicks on the 4th down, to avoid giving the other team the ball at the current yardage. If a team gains the 10 yards before 4 downs, the yardage resets. That is they earn another 4 downs to gain 10 yards.
In the first picture we see a 1st down and 10. Meaning this is the 1st of the 4 downs explained above, and the team with possession has 10 yards to go to gain their next first down. You can also confirm that by looking at the distance between the blue line (on the 40 yard line) and the yellow line (on the 30). Although the default first down yardage is 10 yards, it doesn't always have to be that many yards based on panelties and position of the ball with respect to the end zone.
In the second picture we have 3rd and 8. That means the team with possession is on their 3rd attempt to gain 10 yards, and they still have 8 more yards to go. Again if you look at the distance between the blue line (where the ball is placed) and the yellow line, you'll see there's 8 yards in between them.
Note that those numbers on the field are TV overlays and not present on the field itself, as well as the yellow and blue lines. The blue lines on pictures (not always blue on all broadcasts) is the line of scrimmage, and the yellow line (again not always yellow) is the first down line.