"Moving" from one country to another requires following proper visa/immigration procedures, and being granted permission to remain in the other country. Whether that's for some temporary purpose, e.g. student or employment visa, or immigration & legal residency. Unless you have been approved for & received an appropriate visa, you cannot enter & remain in the country.
E.g. with student or employment visas, you are only allowed to stay in the US as long as you are a full-time student or full-time employee of the employer which applied for your visa. For immigration to US, just over 90% of all immigrants to US are sponsored by an immediate relative who is a US citizen & who earns enough to support self, all dependents, plus the person they sponsor. Waits for the interview for immigration visa run as long as 25 years, depending on citizenship of the prospective immigrant & relationship to their sponsor.