I have a simple drone (less than 250 grams), I want to fly it as high as possible to take photos with it, how can I make sure it doesn’t go out of range considering it has no altitude indicator? What would happen if it does go out of range, would it just fly off?
The first stage is to make sure you read your local laws about altitude and VLOS restrictions.
Once you know what you can legally do, the first stage is to set up a failsafe. Do this by setting failsafe conditions in your radio and in whatever firmware your quad uses. Choose what you want the quad to do during a failsafe, whether it should drop out of the sky or slowly lower.
You can also install GPS and set the failsafe as a return to home, and depending on your firmware there are different ways of doing this.
Another way to make sure you stay in the range is to set up RSSI or LQ depending on your system. This tells you how strong the signal is so you can monitor it.
You can also get an RF meter to make sure there is no interference where you intend to fly.
Finally, you can use a specialty long-range system like TBS Crossfire or FrSKY R9, as long as it is legal in your region.
If you do not have an altimeter or telemetry on the aircraft, you need to monitor your aircraft visually and judge this yourself. It is a good idea to be conservative to prevent loss of signal or breach of your flight limits.
If your aircraft goes out of range then, depending on your aircraft, it will generally:
1) land itself (either where it is or return to home), or
2) fall out of the sky, or
3) keep flying/hovering until it runs out of battery (and then do one of the above.)
You can test this in a controlled environment by turning off the transmitter while the aircraft is flying. This will cause a lost signal (which should be functionally the same as going out of range) and the aircraft will react accordingly - note that it might fall out of the sky or try to fly away, so an indoor low hover over something soft is recommended and don't fly near anything which can be damaged or damage the drone - try this at your own risk! I have done it with commercial DJI multirotors and it is a good exercise for learning what happens; although in this case, the failsafe behaviour was well documented so I knew what to expect!
As an aside, based on your profile you are in the United Kingdom - therefore, it is important to remember to keep your drone below 400ft (~120m).