It is indeed mostly means the public key but sometimes it means the user name part of a federated stellar address, which is something completely different and indeed confusing.
Federation is something you do mostly outside stellar by using the optional memo field on transactions. If you have a federated address of the form username*domain.com, username refers an account on domain.com. Stellar does not understand these addresses natively and you have to use the federation protocol to figure out the correct stellar public key/account id + memo.
So, if domain.com implements the federation protocol, you can hit its federation REST API to get back a stellar account id and memo combination that you can use to send tokens to that user. The way that works is that stellar simply puts tokens in the account without caring about or validating the memo field in any way. The stellar account owner can then can look at incoming transactions and decide based on the memo field which of their users should receive actually receive the tokens.