To hide your online status on Facebook, go to Messenger > Settings and turn off Show when you're active. To block someone so that they can't see you at all, go to Settings & Privacy > Settings > Blocking.