People who have come to Germany as refugees and apply for asylum will usually stay in an initial reception facility when they first arrive. There are various government agencies in charge of providing accommodation in these facilities.
People who are assigned to an initial reception facility will usually also be required to live there, so they cannot simply move to another city or to different accommodation.
The duration of this requirement can vary greatly.
If your asylum application has been accepted, there is also a condition of fixed abode for the first three years after being accepted, as long as you are receiving social security benefits. That means you must continue to live in the federal state or district to which you were allocated by the state during the asylum process.
If you are subject to a condition of fixed abode, this will also be shown on your residence title (card). If you are unsure, you can ask the immigration authority in your town or city for more information.