To erect something means to build it.
The king erected two towers on the north and south sides of his castle.
Example picture