My history teacher said that the father was name cornelius africanus and the son was named cornelius africanus junior but on the internet it doesnt say that.
The full name of the Scipio Africanus that beat Hannibal at Zama (202 BC) was Publius Cornelius Scipio Africanus, and he is never referred to as "Cornelius Africanus" but rather "Scipio Africanus". His father had the same name, minus the "Africanus". It was Africanus' defeat of Hannibal that earned him the agnomen Africanus. As per Roman naming conventions, an agnomen could be passed on to one's heir. So Scipio Africanus that beat Hannibal had a son with precisely the same name, who unfortunately died of illness and never had children.
However, another Roman of a similar name, usually referred to "Publius Cornelius Scipio Aemilianus", was born of another family, the Aemilii, but was adopted by the son of Africanus who died young, hence the cognomen denoting his original family. People often get confused here because Aemilianus, before being adopted by the Scipios, was the nephew of Africanus' wife: that is to say, he was born with a different name as the son of Scipio's wife's brother, who was also a famous general (Lucius Aemilius Paullus Macedonicus who knocked the Macedonians over in 168 BC). Scipio Aemilianus was the man who finally destroyed Carthage in 146 BC, establishing his own claim to the agnomen "Africanus". He actually ended up with several cognomen/agnomen, but once he was adopted he could technically have been called Publius Cornelius Scipio Africanus (among a few other options, 'Aemilianus' probably being more helpful) but suffice to say his name was Publius Cornelius Scipio and one of his agnomen was Africanus. So you can see how flexible (and confusing) these naming conventions are.
There are two options for what your history teacher is talking about. He could be referring to is Publius Cornelius Scipio who died fighting the Carthaginians in Spain in 211 BC, and his son, the famous Publius Cornelius Scipio later named "Africanus". However the father was never named "Africanus". So he may have been talking about the Publius Cornelius Scipio Africanus, the famous one, and either his son who died young or the Scipio Aemilianus his son adopted and who therefore had claim to the the name Africanus himself. Scipio Aemilianus, famous, longer-lived and later referred to as Africanus (among other names) due to his exploits, was also later referred to as Scipio Africanus Minor to differentiate him from his adoptive grandfather, the original Scipio Africanus. I assume this is what your teacher means, but basically your teacher is a bit confused. And who claim blame him?
To answer your question in the title though, there was only one Scipio Africanus in the Second Punic War: the one that beat Hannibal. There was however an adopted Scipio Africanus in the Third Punic War. So you might say there were two Scipio Africanus' in the Punic Wars. They were not father and son however. Scipio Aemilianus only really earned the name Africanus himself when he sacked Carthage, which thereby ended the Third and final Punic War, but he had the name nonetheless. The former was the latter's adoptive grandfather, not his father. There were, however, two Publius Cornelius Scipio's in the Second Punic War: the father who died in 211 BC, and the son who became the (main) famous Africanus.