Will my iPhone's alarm go off even when I have apps open?

I'd like to fall asleep to a relaxing YouTube video but I want to make sure my alarm will still go off in the morning!

Yes.

Yeah when the video is over then a while later your iPhone will lock itself anyways.

Try setting the alarm for a minute from now to test it. If it goes off then, you have your answer. Stay in school.