Let's say you have an open source music player, along comes someone, copies it, adds features, modifies the interface, etc and sells it. Nobody would find out. So how does it work?
Pretty much like you described, except someone has to find out. If he doesn't, then no, you don't know. Which is pretty much the way it goes in a lot of software nowadays. Code and ideas get stolen, ... deal with it, always did, always will.
If somehow you do find out someone "ripped you off", then, presuming your country's laws apply and you have means to pursue, you can take them to court. Which depending on the juridisticial system you're under, can mean you have a practical shot at winning that or only a theoretical one at best.
Related: I'm working in some projects myself to make me more employable, so employers can take a look at my code but with some of them I don't feel like uploading them to an online repository, ie sourceforge, and make them visible for the general public.
Well, either make it a private/public repo. i.e. with a designated login/pass for visitors, a repo which mirrors your main repo where you keep most of your stuff (you don't want to be giving your main acc. to someone) or just mail to them or something. Or put it on a web page not easily found in the vasts of the web. Dropbox link also works.
Also, don't give all of your code (the complete package) away, remove the few relevant bits, but supply the binary. They can see the code and the app, but they can't build the app that way for themselves.