Protein localization is related to many human diseases. Therefore, the prediction of protein localization is an essential task that has been extensively studied. Additionally, the study of the localization mechanism can provide more biological insights and testable hypotheses. In this thesis, we propose MULocDeep, a general deep learning-based localization prediction framework. We designed a matrix layer in its architecture to reflect the hierarchical relationships of localization in cells. This enables MULocDeep, to predict multiple localizations of a protein at both subcellular and suborganellar levels. We collected a dataset with 44 suborganellar localization annotations in 10 major subcellular compartments--the most comprehensive suborganelle localization dataset to date. Our collaborators also experimentally generated an independent dataset of mitochondrial proteins in Arabidopsis thaliana cell cultures, Solanum tuberosum tubers, and Vicia faba roots and made this dataset publicl using the above datasets show that overall, MULocDeep outperforms other major methods at both subcellular and suborganellar levels. We also applied Long short-term memory (LSTM) and the multi-head self-attention in MULocDeep to pursue a single amino acid level resolution when assessing their contributions to localization. This provides insights into the mechanism of protein sorting and localization motifs. Many of the candidate sites or motifs match the existing localization knowledge. A web server can be accessed at https://www.mu-loc.org/.