Hi dthompson1210,
You're correct in that the people you refer to as playing "along" with a song, they're most likely playing notes in a scale from the correct key. This blew my mind for a really long time when I first started learning guitar.
Before you can do this, you'll have to familiarize yourself with a scale, most people learn the major and minor scales first. You can check out this tutorial here: https://www.guitartricks.com/lesson.php?input=20152&s_id=1586
The more you practice, you'll eventually be able to identify certain sounds from a song, and find the key. Once you know the key of a song, and once you have these scales in your back pocket, you'd be able to "play along" like your peers. Don't be discouraged, this takes a bit of time to figure out, it's like learning a language, but much louder.
Hope that helps.
- Billy
If you have any questions, comments, or concerns, please
contact us.