If you are referring to search ads, you don’t really have an option to target location at the ad group level. Location targeting is only possible at the campaign level, not the ad group level.
The purpose of an ad group is to pair the keyword or keywords that will trigger your competition in an ad auction with the ad, or set of ads, that will be displayed in the event you win an ad slot position.
In other words, it is how you tell the ad platform which ads are to be displayed with which search terms.
The mechanics of what and where you can target at the ad group level may vary based on the ad platform, but generally, you would target devices either at the campaign level or at the individual ad level, not at the ad group level. It is typically possible to have mobile ads and desktop ads within the same ad group.
You also have the option of making bid adjustments based on device type at the ad group level. So you can choose to organize your account to target devices at the ad group level using the bid adjustment for device type feature.
Ultimately, how you structure your account is dictated by your campaign optimization strategy. There are many possibilities, and it can get very complex if you want to go that route. In the end, you must decide how granular you wish to go, you must decide which way you want to organize your account there is not just one way to do it, but some will work better than others.
I suggest you pick a strategy that may give you an advantage against your competitors but try not to go overboard with too much complexity else it will become unmanageable.
To answer your question about how similar keywords must be, there are no mandatory requirements, but generally speaking the more similar the keywords the better. In fact, some people often choose a SKAG (Single Keyword Ad Group) strategy to get the most precise results possible. In the end, you need to weigh the balance between granularity and data volume, because you need adequate levels of both to get optimum results.