In the UK (which drives on the left), this is governed by rule 186 of the Highway Code:
When taking the first exit to the left, unless signs or markings indicate otherwise
- signal left and approach in the left-hand lane
- keep to the left on the roundabout and continue signalling left to leave.
When taking an exit to the right or going full circle, unless signs or markings indicate otherwise
- signal right and approach in the right-hand lane
- keep to the right on the roundabout until you need to change lanes to exit the roundabout
- signal left after you have passed the exit before the one you want.
When taking any intermediate exit, unless signs or markings indicate otherwise
- select the appropriate lane on approach to and on the roundabout
- you should not normally need to signal on approach
- stay in this lane until you need to alter course to exit the roundabout
- signal left after you have passed the exit before the one you want.
When there are more than three lanes at the entrance to a roundabout, use the most appropriate lane on approach and through it.
To address some of the points raised in the question:
Crossing the outer lane to the inner lane when entering the roundabout. This is relatively easy, as I can usually safely stop and wait until there is room to enter the roundabout.
Rule 185 states that you must "give priority to traffic approaching from your right". As far as I'm aware, this means that, regardless of the lane you're joining, there must be no cars in any lane at the point when you join the roundabout.
Why? Because if you join the left-most lane when there is a car in the right-most lane, you are now blocking his exit if he wants to change lanes. Which leads to:
If there is traffic in the outer lane, I am stuck and I cannot exit. I can also not stop safely. Should I keep driving in circles in the inner lane until there is space to exit to the outer lane?
Yes, go round again. If everyone is sticking to the rules, then this shouldn't happen. Sadly, this isn't always the case.
Are there some tricks to determine the lane of traffic behind me on the two-lane roundabout?
Assuming you mean behind and to the left, then the key is to check your left-hand-side wing mirror before you move to the left lane, in order to judge if it's safe to move over. As you imply, this can be tricky on smaller roundabouts, where the curvature of the road can make it harder to see; in this instance, you may need to rely on your rear-view mirror instead.
Note that the Highway Code, and hence this answer, applies specifically to the UK. As other answers show, different countries have different rules, so you need to make sure you're familiar with the local rules.