The second thing you need to know about the word "fuck" is that its use as an intensifier is strongly associated with certain classes, genders, and regions, and – moving from the topic of English grammar to the anthropology of English usage – has, just about everywhere, very strong and very complex norms (social rules) around just who can use it in the presence of whom.
The use of "fuck", especially as an intensifier as in your examples, is extremely fraught with taboos. The consequences of using it wrong can be very severe. You can get fired for using it in the workplace.
It is very much not for beginners. I hate to tell anyone not to learn a thing, especially this – I am from a (the?) region, Boston, strongly associated with this sort of usage, and I do use it myself – but I want to caution you about this in the strongest terms. There is a reason the use of "fuck" this way is explicitly forbidden by the Stack Exchange rules.
So all that said, to understand the usage you may encounter:
As @probablyme said, in this usage (there are others) it's an intensifier. When you see it used in films, it's often to indicate things about the character. For instance, that they're from Boston. A "fuck" super-cut (montage video) of the movie "The Departed" (NSWF!) (set in Boston) that documents the movie had "237 F-bombs", which amount among them to over two minutes of the total run time of the film.
But the characters, whether from Boston or elsewhere, thus depicted are typically "rough", either criminals heedless of social rules or blue collar workers (including police) also presumed to be unconcerned with social niceties.
This is something of a fiction: the real-life social rules around "fuck" (in those populations in which this sort of use is idiomatic) are more complicated than "uncouth people use it". Though nobody comes out and says so, one of the unspoken rules is that you do not say "fuck" in front of a social superior. A boss may swear (i.e. use one of these "vulgar" taboo intensifier words) in front of his employee, but the employee is much less likely to swear in front of the boss, and if he does so by accident, he is likely to apologize for doing so. I'm a medical professional working in a blue collar neighborhood, and patients who swear in my presence usually blush, look abashed, and apologize, sometimes even after I've told them I haven't any problem with it and they are welcome to express themselves however they like.
In such demographics, people talking with peers might swear freely. This glorious, hilarious, and now famous example (NSFW!) captures an actual blue-collar man from Malden (inner suburb of Boston) caught up in an ecstasy of wonder at the natural world while on a fishing trip with a friend. It became a viral sensation because it's so extreme, it's a perfect embodiment of the blue-collar Malden resident stereotype.
The important take away here is that if you are socializing with Americans (I gather this is also true for Aussies and Brits) and hear them swearing a lot, say, while drinking after work, that does not mean that it's okay to swear around them in the workplace; and just because a boss or professor or customer says "fuck" as an intensifier in your presence does not mean it's okay for you to do so.
Looked at through this lens, you may be able to decode things about power relations among people who use "fuck" as an intensifier. For instance, IT staff and programmers in many organizations swear pretty freely on the job, and it's often indicative of the staff feeling powerful and secure within the organization – the individuals don't fear being fired and aren't being deferent to their nominal bosses.
Meanwhile, there are demographics which object to this usage, in any circumstances, in the strongest way. They will be extremely offended if you use a vulgar intensifier of any sort in their presence. (Part of the stereotype of Bostonians swearing a lot is that it conveys the stereotype idea that Bostonians don't care whom they offend.) Please note that the word "fuck", whether as an intensifier, an insult, a term for a sexual act, or any other use, is so offensive, that it is effectively illegal to broadcast over radio or on TV. Hence the practice of "beeping" it, e.g. when Mikey and Jay from the sunfish video were interviewed on television.
P.S. There are demographics of Americans (Midwesterners? not sure) where men don't swear in front of women and women don't swear in front of men, but swearing may be done (pending other rules) in single-sex situations. There are other demographics in which apologizing for swearing in front of the other sex is considered rude and/or sexist. As I said, this is not for beginners.