I personally think that rhythm is something that you have to acquire through practice (like pretty much everything on the guitar lol). As a beginner, it was one of the most frustrating obstacles that i had to deal with in order to play songs the way I wanted them. At the same time, I think the struggle is necessary in order to develop your own personal ways of strumming. Everyone needs their own style. Also, as someone who is attempting to teach others how to play (friends mostly), I discovered that certain people have more difficulty trying to imitate others, rather than just trying to do their own thing.
One thing that helped me a lot when I was learning a song was to familiarize myself with the riffs/chords as much as I could so that I could play them without problems and make changes between the different parts quickly. After I would play a video or recording of the song and try to strum along with the beat.
The websites mentioned by the other members contain great tips and lessons as well. I would recommend checking out Justin Guitar for sure and also this site:
On spytunes, you'll find a list of popular songs which are classified by difficulty level. Each video shows you what the guitarist is doing on the fretting hand and the strumming hand at the same time. It's a good visual tool, but remember to follow your ear more than your eyes. I think that developing a good ear is crucial, especially when you decide that it's time to jam it out with other people.
Good luck and don't get discouraged. The thing about music is that the journey is more important than the goal. So make sure you enjoy it and learn to laugh at yourself when you make a mistake instead of berating yourself. Music's supposed to be fun