Letting your professor know what is going on is so important as the earlier they know about a situation, obstacle, or emergency the better they can assist you. Sometimes it can be intimidating can reach out to a professor and share what is going; however, if you don't reach out and ask, then you'll never know!
Another tip for communicating with professors is to think through a potential solution and mention that to the professor. For example, if you went to the ER for an emergency and needed some more time to submit an assignment. You would share with the professor when you were in the ER, request more time for the assignment ("Would it be possible for me to submit the assignment to you by _____?"), and discuss what you have completed ("I have already complete the first two parts of the paper so I know I can complete the remaining two parts by _____.").