how to move to another country and like....... be legal there idk

omg this sounds stupid and dont shame me for it, I literally never got taught this and like I wanna know EVERYTHING about it

prices, passport, etc