Let's take the last question first (since that's an easier and non-technical story).
Canon EOS lenses come in (mostly) two flavors... "EF" and "EF-S". There are also some specialty lenses -- a specialty Macro Photo lens called the MP-E (which is used for extreme macro -- much closer than other macro lenses can do) and several tilt-shift lenses called the TS-E lenses. All of the specialty lenses can be treated like "EF" lenses. Lastly, Canon makes a few lenses for their mirrorless camera called the EF-M lenses but those are not sold in North America.
When Canon introduced the EOS system they were 35mm film cameras and digital was not yet on the market. The lenses for these cameras were all "EF" lenses.
When digital first started to appear, the sensors were VERY expensive. To make things economical, a cut-down version of the sensor was used. The size for this new smaller digital sensor was based on the size of a single frame of APS-C film (APS-C = Advanced Photo System - Classic size). This made the cameras more affordable. But the APS-C size is smaller than 35mm size.
Meanwhile, the "EF" lenses were designed for 35mm film cameras. There's nothing magical about a lens that makes it "film" vs. "digital" -- it's really all about the size of the image recording media inside the camera. The diagonal measurement of a frame of 35mm film is just over 43mm. That means the lens needs optics that can produce a sharp image of at least that size. The image circle is usually a little larger. A generalization of optical lenses is that the point at the very center of the optical image (along the lens central axis) will typically be the best in terms of quality. The farther you get from the center, the more the quality degrades and you have to do elaborate things as an optical engineer to try to maintain good quality for those points which are far from the center point of the image.
SO... Canon realized that since the digital cameras had smaller sensors than 35mm film... they could also produce lenses that didn't need to project an image circle large enough to cover the 35mm area (a digital camera which has a sensor the same size as a frame of 35mm film is referred to as a "full frame" digital camera). This would save on the cost of the lens since you don't have to be as elaborate to maintain image quality when the image circle projected by the lens is smaller. This idea allows for more affordable lenses while STILL maintaining good optical quality.
Canon called this new line of lenses the "EF-S" lenses. The "S" stands for "Short" back-focus lenses because in making the design, the rear-most element on the lens sits farther back into the camera. The physical measurement from the rear-most lens element to the sensor on an EF-S lens is actually shorter than the measurement on an EF lens. The mounting flange on the front of any EOS camera is identical, however... so any Canon EOS camera can accept a Canon "EF" lens. This means if you have a Canon camera that has an APS-C size sensor, you can use EITHER the Canon EF-S lenses OR the Canon EF lenses (you can also use any of the specialty lenses). The only lenses you cannot use are the EF-M lenses (which are not sold in North America.)
The focal length of a lens is the same regardless of whether it's on a full-frame vs. a crop-frame (APS-C) camera. But since the sensor is smaller, it is "as if" you took a shot with a full-frame camera, and then cropped in slightly into the center region... and then enlarged that crop. For this reason, some people will refer to using a lens on a "crop frame" body as having greater "reach" (appears to be a stronger magnification). Optically it's not really any different than cropping in on the center part of an image that was shot with a full-frame camera.
Next... that "f" number thingy...
The "f" is usually expressed just before a slash ("/"). The "f/" stands for "focal ratio". So "f/4" means you have a focal ratio of 4 (or a 1:4 ratio). It is actually the ratio of the focal length of the lens divided by the physical diameter of clear aperture that the lens can provide. Suppose you have a 50mm focal length lens (not a zoom) and it's largest diameter of clear aperture happens to be 25mm. Since 50 ÷ 25 = 2 you would say that this lens is an "f/2" lens. I happen to own a 135mm f/2 lens... which means the diameter of clear aperture is actually about 67mm wide (the lens is physically larger... that's just the clear area through which the light can pass... not counting the rest of the lens body.)
The reason we use ratios is because photographically they happen to be somewhat universal. As light passes through a long tunnel the amount of light that can reach the far end of that tunnel is reduced. Your lens is basically a "tunnel". But imagine you cut a cave into the side of a mountain... and this hole you bore has a diameter of 10'. If you stand at the entrance of your "cave" you've got plenty of light... in fact as you stand just inside the cave (within 1' of the opening) it's hard to tell the difference between standing inside the cave vs. outside the cave. If you walk 20' back into the cave... it gets a bit darker. If you walk 100' into the cave it's a LOT darker. The diameter of the cave hasn't changed... only the distance you are from the entrance has changed. Being 20' inside the cave is basically "f/2" light. Being 100' into the cave is "f/10".
But these "f/" values apply somewhat universally. Suppose you are outside in the middle of a bright sunny day. The sun provides a rather consistent amount of light that really doesn't change as long as it's mid-day -- no clouds -- no shade -- etc. Photographically you can measure that light with a light meter and that meter would tell you that if you use an ISO of 100 and a focal ratio of f/16 then the shutter speed needs to be set to 1/100th second to get a correct exposure with that much light. But notice what it DOES NOT include... it does NOT seem to care what the focal length is of your lens. You could be shooting with a 10mm ultra-wide angle lens... or you could be shooting with an 800mm extreme telephoto lens... f/2 is f/2 is f/2. The lens' focal length does not matter... only the ratio matters when it comes to determine how much light will arrive at the far end where the image sensor is located.
You are correct in that the notion of having a "sharp" subject and a "blurred" background is based on the "depth of field" (often abbreviated "DoF"). But it turns out DoF requires more than just a focal ratio change... there are at least 3 factors (and technically 4) that influence DoF.
DoF refers to the range of distances at which a subject will appear to be in acceptable focus.
A low focal ratio (large aperture opening) influences the DoF to be shallower. A high focal ratio influences the DoF to be deeper.
A close focusing distance influences the DoF to be shallower. A far focusing distance influences the DoF to be deeper.
A long focal length influences the DoF to be shallower. A short focal length influences the DoF to be deeper.
Lastly... sensor size matters. A larger sensor or media size influences the DoF to be shorter. A tiny sensor influences the DoF to be deeper.
Notice I said "influences" -- because you don't know the DoF until you combine all three factors.
I have a 14mm lens and suppose I select a focal ratio of f/4 and I focus on a subject about 10' away. While we normally think of f/4 as being able to provide a moderately shallow depth of field for many lenses... that's not true on a 14mm focal length lens. With this lens on my full-frame camera, everything from just over 5' all the out to "infinity" will appear to be in acceptable focus.
If the ONLY factor I change is the lens focal length... suppose I attach a 300mm lens... it all changes. Now when I focus at 10' the DoF drops to a mere 0.07' ... that's less than one inch!! The only thing I changed is the focal length of the lens.
That's an example of changing the DoF by changing the focal length... but you can also change the DoF by changing the focus distance or focal ratio. You can't really change your sensor size (unless you get a different camera). So we don't normally talk about changing the sensor size. But if you've ever wondered why DSLR cameras (with the right lens and settings) can produce a beautifully de-focused background while point & shoot cameras and camera phones cannot produce beautifully de-focused backgrounds ... it's because sensor size matters.