How to remove background from video without using green screen
Looking at your first example, I woul guess green screen, and not a particularly good one. It looks like they really need to increase the spill suppression, judging by the green spill evident on the feet of the bin.

An alternative approach is to shoot in a studio with an infinite white cyc, for example something like this one (randomly selected from a duckduckgo search, not necessarily endorsed). When lit correctly it will look like the second example, though that too could totally have been done with greenscreen—the forearms look a lot like there's spill that's been corrected. 



The reason for shooting against green, rather than shooting against white or black is when you want to do background replacement. If you know that the background is going to just be white, then shooting against white is the way to go. But if you want to replace the background and you use white (or black) then any highlights (or shadows) are going to become transparent. It's much easier to keep green out 
of your foreground than stopping it having any highlights or shadows.

Another approach is to use rotoscoping. This is where masks are drawn around the foreground to cut it out from the background. While software like After Effects includes tools to automate this task somewhat, it is still a very time and labour-intensive process, and generally the results are inferior to other techniques. I would use rotoscoping only as a last resort, and I don't think I'm alone here.