As wideyes mentioned, this question is quite vague. Also, Windows and Linux work completely differently. (Please note, though, that this is a Linux-specific forum.)
In Linux, if you are attempting to broadcast a message out to all other users logged into a particular machine, you can do so with the "wall" command.
# wall Text of your message
The "write" command does the same thing, but will allow you to send target the message to a particular user, rather than broadcasting out to everyone.
Sending messages to users in Windows is done through Task Manager. Task Manager has a tab called "Users" that will allow you to select a user who is currently logged in and send them a pop-up message by selecting the "Send Message" button at the bottom.
Now... if you're talking about sending emails
from the command line, that can be done easily if you already have a mail agent (like Sendmail) installed and configured. To send an email with Sendmail, you would do it as follows.
# mail -s "Subject of email" email@example.com
After this, your cursor will move to a blank line. You will type the text of your email here, just as you would in a text editor. When completed, hit Ctrl+D. You'll be presented with a CC: line, and if you need to copy anyone, you will list their email address here. (If not, just leave it blank.) When you hit enter again, your message will be sent.
If you don't have Sendmail, Postfix, or whatever installed, you can also send an email by establishing a telnet connection to your mail server on port 25. Below is an example of me doing so through my ISP's mail server. (Email and IP addresses in output have been changed. The text in bold is what I typed.)
[mike@myserver ~]$ telnet mail.charter.net 25
Connected to mail.charter.net (126.96.36.199).
Escape character is '^]'.
220 imp09 smtp.charter.net ESMTP server ready 20101208 043401
250 imp09 hello [188.8.131.52], pleased to meet you
250 2.1.0 <firstname.lastname@example.org> sender ok
250 2.1.5 <email@example.com> recipient ok
354 enter mail, end with "." on a line by itself
This is the text of my email.
250 2.0.0 Message received: 20101208093453.DLKN4190.mta31.charter.net@imp09 E0000
The telnet method works in either Linux or Windows.
If none of this answers your question, you will need to be more specific as to exactly what it is that you are trying to do.