The Castello di Giulio II, or Castle of Julius II, is in the medieval hamlet of Ostia, just outside the entrance to the Ostia Antica archaeological site. The fortress was built in 1486 for bishop Giuliano della Rovere, who later became Pope Julius II, at the same time the church was renovated. Unfortunately the castle was abandoned the following year due to floods but it still retains much of its original design.
Inside the castle is a small museum of ceramics. The castle and museum can only be visited on a guided tour, currently free but only given at 11:00 on Thursdays or 11:00 and noon on Sundays. It’s an interesting tour that lasts about 45 minutes. Scroll down to Castle on this Ostia Antica site for updated times and cost.
The small medieval hamlet itself is also interesting to explore and has several restaurants. I had a good, inexpensive lunch at Ristorante Cipriani.
For information on how to get there and visiting the excavations, see Rome day trip to Ostia Antica itinerary.