If my friend sent a recording of his lecture; Is it against the law?
In the United States, the person who delivered the lecture owns the copyright if the lecture is "fixed" in tangible form.  That recording fixes the lecture in tangible form, even if the person who delivered the lecture didn't make the recording.  So, in the U.S., it's (probably) covered by copyright.  (I'm not a lawyer.)

The person who made the recording, if not the person who delivered the lecture and thus owns the copyright, absolutely shouldn't post it any place, e.g. on YouTube without the permission, preferably in writing, of the person who delivered the lecture.  That person should ask before sharing it with a friend; probably most professors would allow that.