Judaism does not know when a day begins
It should be obvious that a new day begins when the previous day end. But it is not so in Judaism. Why?
According to the Torah, as explained by the sage Rashbam in his commentary to Genesis 1:5, the day begins in the morning. Scripture states that God did creative acts during the day and this was followed by evening and morning, the end of the day. It was most likely during the Babylonian exile after the temple was destroyed in 586 BCE that the Israelites accepted the Babylonian practice of starting the day at night.
While the beginning of the day changed for other purposes, it did not change the temple service. When the second temple was constructed, the day began in the morning as in the past, and the first sacrifice was offered in the morning.
This happened also with the months. According to Exodus 12:1, the month in which the Israelites left Egypt, later probably during the Babylonian exile called Nisan, was the first month of the year. The biblical view in both cases was that the day and year began optimistically in brightness. But this was changed to the night and winter.
But the problem was when does night begin? After some deliberation, it was decided that it must begin sometime between when the sun began to set and when it was so dark that several stars could be seen. And, so, the Sabbath beginning and ending used both ideas. Sabbath began when the sun began to set, eighteen minutes before sunset, and ended when it was so dark that several stars could be seen. As a result, the Sabbath is not a 24-hour period, but 25.
 When does the day begin according to the biblical view is also unclear and produced different views, which I will not discuss here.