You may be talking about Minecraft Realms. It's been a thing for Pocket Edition for some time now, and only just recently became available for PC. I only just learned about it tonight, when I saw a new option on the startup screen. DD tells me she's seen it on her iPod for eons.
Realms requires a monthly subscription fee. They host your Minecraft world, and only people you've invited get access.
Creating a world on your own machine is free. You can also share it... here, we only open up worlds for sharing on our LAN, so unless you've got our wireless password, you'll never see it. That works for both PE and PC, though not across platforms... you can't create a world on a tablet and share it to someone on a PC or an Xbox. All three products might be called Minecraft and have the same look and feel, but they're actually three totally different and incompatible pieces of software.
Xbox also allows you to share locally, with a split-screen option and an Xbox Live option.
If you connect to an open Minecraft server, then unless the owners have modded it in ways that prevent griefing, bad things can happen. Ditto if you share your own worlds to the whole web.