Yes, when you buy a song on iTunes (or the Apple Music app), it automatically downloads to your iTunes library and becomes accessible on all devices authorized with your Apple ID.