An eight-year-old girl and her mother are in hospital after being hit by a learner driver's car while trick or treating in Sydney's west.

Police said a ute struck the pair after mounting the footpath on Greenwood Parkway at Jordan Springs about 7:00pm.

Officers said the girl was taken to Westmead Children's Hospital in a serious but stable condition, suffering a head laceration.

Her 27-year-old mother has been taken to Westmead Hospital also in a serious but stable condition and suffering pelvis injuries.

The vehicle then hit a parked car that was in a driveway outside a home.

Police said the 40-year-old female learner driver and her male passenger escaped uninjured.

NSW Police said officers were investigating the incident.