I'm new to electronics and have a question about oscilloscopes, if I understand this correct when attaching probes, one of the leads of the probe needs to be grounded, my question is why? Can't I use a oscilloscope just as a voltage-meter to measure the potential difference across the two leads ? What would happend if I attached the "ground" lead to something non-ground ?
Depending on the oscilloscope you have (handheld vs. desktop with mains supply), the shield (reference) of your probe will be connected to the chassis ground of the scope. If you have a scope with mains supply, this will be protective earth (PE). If you connect a circuit that is also connected to PE to the reference at a place that is not Ground, current will flow through the shield of your probe and might damage the circuit or the scope.
Additionally, most Scopes are build with RF signals in mind, which require a reference signal close by for signal integrity. That's why you cannot treat them like a simple multimeter.
A handheld scope is easier to use similar to a multimeter, as it does not have a connection to PE. But even then, for high frequencies > 100kHz, you will most likely end up using it in a similar way and connecting the reference to a GND point on your PCB close to the point where you connect to your signal.
If you want to measure the difference between two points on your circuit, use two probes: Connect the reference of each to a GND point close to the probe point. Then on your scope, you can use the math function to view the difference between the two channels, which will give you the same result as if you had measured with a floating probe between the two probe points.