what you describe is all perfectly normal.
it's normal to wake up with an erection every morning - it's believed that this is caused by pressure caused by a full bladder, even though some men find they have morning erections, no matter whether their bladder is full or not. another possible explanation is that morning erections are caused by blood supply mechanisms during sleep. no matter what - it's nothing to worry about.
it's also normal to get an erection when you hug someone - during puberty, guys often get erections even when situations aren't specifically arousing or sexual (yet). nothing to be embarrassed or worried or ashamed about. usually, you will find that you get less of those super-spontaenous erections as you get older.
hope this answers your questions.
Spike: (In response to being asked to fight a troll) "I would, but I'm paralyzed with not caring very much."