Going to a party, by itself, is not illegal. That is, of course, as long as you are not in violation of a curfew and are not breaking any other laws like noise ordinances, underage consumption of alcohol, or narcotics. However, if the party involves alcohol and/or drugs or otherwise violates some law, then you would get into trouble for being there, regardless of whether your parents allowed you to go.