There are fortified buildings you might call castles all over Italy, but in Genoa there are only a couple of buildings that really look like traditional castles. There are, however, several palaces in Genoa you can visit, and many castles and fortresses near the city if you're out and about on a day trip.
The Albertis Castle in Genoa (Castello d'Albertis in Italian) is the city's primary castle structure. It was a former private home, but it's not an ancient building. It was built in the late 1800s, made to resemble an old-fashioned fortress, as the residence of a ship captain called Enrico Alberto d'Albertis. He died in 1932, and at that point the castle was given to the city of Genoa. Today it's the home of the Museum of World Cultures.
The Castle Mackenzie is another relatively recent structure – also built in the late 1800s in the Castelletto district of Genoa – as a private home for a man named Evan Mackenzie. After Mackenzie died the castle went unused for many years, although now it is used for special cultural events and there are some historic objects on display.
Other former homes of noble families are open to the public in Genoa, although these are called palaces rather than castles. On Via Garibaldi alone, you can visit several of these palaces – the Palazzo Rosso and the Palazzo Bianco both house fine art galleries, and both have areas that are furnished as the house might have been in the 18th century. The Palazzo Doria Tursi was once a private home, and it's now a city government building – but there's a room that has some historic items on display, and the palace's gardens are open to visitors, too. The Palazzo Reale was once one of the residences of the Royal Savoy family, and is now an art gallery. The gardens are also worth visiting.
If you're looking for more old castles, then you can head out into Liguria to explore bona fide fortresses such as the 16th century Castello Brown in Portofino, the 12th century castle overlooking Lerici, and two impressive fortresses in Sarzana.