You can take a train from the central station in Naples and get out at the Caserta station. The palace is only a short walk afterward.