Likely a hydrocele
About half of all newborn boys will have a condition called a communicating hydrocele
This means that there is an opening between the abdominal cavity and the scrotum. Fluid accumulates in the scrotum, causing painless swelling. This condition usually resolves on its own within one year. Any pain or redness could indicate a more serious condition. Either way, your baby's doctor should evaluate it.