I believe what you are referencing is the setting in Ubuntu that can be configured called 'Raise window if covered, otherwise lower it.'
Unfortunately there is no equivalent for this action built into the Mac OS. We have plenty of shortcuts, but not that one.
There has been plenty of discussion about this missing feature in past questions like this one, which is broken down a little better for readers in this answer. I'm not marking your question as a duplicate because it's not exactly the same, and we're now dealing with a different OS than they would have been 5 years ago.
Here are our options:
- 'command + tab' - for cycling through open applications
- 'command + `' - for cycling through multiple windows of the active
- 'command + H' - to hide an application (all windows) without minimizing it; handy when you still want to be able to access the window from the application switcher without having to de-minimize it first
If the built in shortcuts of the Mac OS just don't work for what you're trying to accomplish, I suggest looking into a 3rd party solution. I have heard good things about a program called 'Witch' (although I don't use it myself). BetterTouchTool is another that I've seen recommended by many, but there are many on the market that have the ability to program shortcuts (and gestures) for the purpose of cycling through, activating, and handling open applications and/or windows.