They are illegal immigrants (and considered a serious security threat), and are locked up pending deportation and are free to go back to their own countries any time. However, because they are likely to be tortured or killed by their own governments, they prefer to stay in a UK prison.
Ah, thanks!