There are 3 train stations in town: Monte Abrão, Barcarena-Massamá and Queluz-Belas. Monte Abrão and Queluz-Belas are the most useful ones for travellers. They're on the Lisbon-Sintra route and are served by trains every 15 minutes or so. When you're coming in from Lisbon, catch a train from Rossio station (15min, €1.20)
It's about a 15 minute walk from either of the recommended train stations to the palace.
Palácio Nacional de Queluz, Largo do Palácio. Although smaller in size, this 18th century castle is sometimes called the Portuguese Versailles, for its extravagant designs and detailed decorations, both on the outside and on the inside. It's considered a prime piece of Rococo architecture and has been thoroughly restored to now serve as a major tourist attraction in the region. €8.50.
Pousada of D. Maria. This large pousada, or luxurious inn, is part of the historical servants quarters of the palace. It originates around the same time as the palace, but the design of its tower is rather Baroque in style than Rococo.