Disclaimer: I occupy 99% of my considerable music time listening to and learning about the actual music, and 1% learning about these software matters. So, I'm not a newbie, but I'm very far from expert on this stuff. I know least about your last clause/question and my last paragraph.
There will be Rip settings in your music software, and you'll want to select a lossless format. I use Zune; pre-Zune, I did it with Windows Media Player. Zune saves in WMA lossless only, which is compressed; WMP in either WMA, or WAV, which is uncompressed. Most popular lossless formats, including FLAC and ALAC are compressed formats. In Zune, go to Settings --> Software --> Rip; in WMP, go to Organize --> Options --> Rip Music. You can also select in either to Rip CDs automatically. I have Zune set to rip in lossless, but not automatically.
As for how to get it on XBM, I can't help. I now sync only Zune players, because I cannot sync my Lumia 1020 with Windows 7. I only have the 1020 set to sync with my server/cloud music, which consists of a mysterious selection of any/everything I've ever downloaded, and everything I've purchased. As for purchasing lossless, you'll have to rely on your Rips, and on purchases from specialized sites/services that sell lossless at premium rates. Enjoy the music, in all formats. :wink: