In the Minecraft game, similar to real life, obsidian is formed when flowing water hits a lava source block. That doesn't need to happen intentionally, you can naturally find it in places where water from a spring or a lake flows over a nearby lava pool.