Assuming someone lost her phone and want to send message with the pass code, how do you go about it

how can I use the pass code to send a theft alert or to lock my device