Ignoring for a moment company policies, which will vary from company to company, the answer most likely depends on why you didn't get the original position.
Here are some answers --
- You were one of several highly ranked candidates in the final interview round
In this case, it may well be that you'd once again be highly ranked and wind up being successful. If it has been several months your name may not have been kept in consideration because they thought you might have had a job already. You should consider applying.
- You didn't make it to the last round of interviews, but nothing in your interviews was disqualifying
In this case, you would likely face the same competition for the position again. Sometimes the competition is really high and sometimes it isn't. Right now the job market favors candidates and you might well be one of only a few candidates for the position. If you do give it a try you might ask where you stand in the competition. Because, next bullet.
- You didn't make it very far, or you've been rejected more than once
Face it, sometimes you're just not the right candidate, or they just don't want you. If they aren't giving you positive feedback by getting you further into the process, please don't annoy them with more attempts at being hired. Move on. Try somewhere else.
The big risk with repeatedly applying is appearing overly anxious or showing that you maybe aren't getting interest from other companies.