The best view of what remains of the medieval section of Riga Castle is from the Daugava river. The most identifiable feature is the round tower. There were originally four rectangular towers one at each corner of a rectangular courtyard with fortified walls.
It was built on the banks of the river so that it could control trade, levy import taxes and fire on any enemy ships. The castle was built in 1330 but in 1484 it was pulled down by the local Rigans who had took over the city when they rebelled against the occupying German Teutonic Knights of the Livonian Order. In 1491, the Livonian Order came back, retook the city and ordered Riga Castle to be rebuilt. Because of the development of gunpowder and siege cannons the towers were now built as a round cylinder to help deflect cannon balls.
The construction was completed in 1515. When the order ceased to exist in 1562, the castle remained part of the Riga defence system. For many centuries it served as the main residence for the head of the occupying forces be they from Poland, Sweden or Russia.
Between the 17th and 19th centuries there was continual reconstruction and remodeling work to turn Riga castle into a palace suitable for the head of state to govern the country and receive visiting heads of state. The remaining round tower was badly damaged after heavy shelling in 1919 during the Latvian Civil War. It has been since been restored.
Riga Castle today is the seat of the Latvian president which means a lot of the castle is off limits to visitors but you can visit the History Museum of Latvia and the Museum of Foreign Art that are housed within Riga Castle
There is a fairy story attached to Riga castle. It is about a witch and her daughter: When Poland gained power in Riga, the Swedes came and wanted the city. The daughter of the Polish king was a real-life witch who climbed up to the tower and sat there in protest. She bewitched all the bullets so that they rolled back and didn't even touch her.
At last, a very clever soldier called Peter made friends with the witch's daughter and cheated a secret out of her: how to kill the witch. The only way you could was by shooting her with a silver bullet. Peter found a silver bullet and killed the witch, which actually just turned her into a magpie.
The witch sank into the Daugava River, but before she did, she put a curse on her daughter. It is said that while the witch sleeps at the bottom of the river, not a single magpie will settle in Riga.