Plane: The Gorizia Airport offers direct connections to England, Germany and Italy. From there you can take the bus number 51 directly to Trieste, paying 4.05 € for the ride. After that you must take the buses number 6 and 36. You can take it right next to the main train station. All information about the transport you can find in: http://www.triestetrasporti.it/index.php?it
Train: By train you can easily travel to Trieste from various points of Italy. After that you have to take the bus to Miramare Castle. http://www.fsitaliane.it/homepage_en.html
Car: Travelling by car is highly recommended to directly reach Trieste and from there to continue the signs to the Miramare Castle.