A sleepover is a type of party when several young people stay for the night at a friend's home.
(What is the part of speech of 'when'? Is 'when' a conjunction or a relative adverb? Can we use 'where' instead of 'when'?)
It's a subordinating conjunction in this sentence.
http://grammar.ccc.commnet.edu/grammar/conjunctions.htm#subordinating_conjunctions
It's better not to use "where" here because you're not referring to a place; you're referring to more of a time.
The word "when" in the given sentence is a conjunction. It connects the dependent clause "several young people stay for the night at a friend's home" with the main clause "A sleepover is a type of party."
Yes, "when" can be replaced with "where" to create a similar sentence structure, but it would change the meaning slightly. If you say "A sleepover is a type of party where several young people stay for the night at a friend's home," it would imply that the defining characteristic of a sleepover is the location where it takes place, rather than the time.