If you have been arrested, you always have the right to ask for a lawyer. This can be a lawyer selected for you or you can choose a lawyer yourself if you know one. So it is useful if you choose a lawyer yourself to remember their telephone number or write it down somewhere (Tip: the labels on your clothes can be useful!)
If you are assigned a lawyer, depending on how much you earn, he or she may do his or her work pro bono for you.