Your command means "find a package named emacs23 and install it".
E:unable to locate package emacs23
means that the system that is looking for the package (apt), cannot find it. There is no reference to this package.
This could mean several things
- the package does not exist: this is not the case for you, as this package does exist.
- the package does exist, but not in any source you are using. This could be the case, but isn't very likely: it is present in the basic sources you probably have. You could, if all else (meaning the next point) fails, try and check out what sources you are using.
You didn't update your apt. For apt to know what it can do with current sources, it needs to know what packages are available. You do this by typing the apt-get update command (possibly using sudo, making it:
sudo apt-get update
now it knows what packages are available, and if you don't run in to problems 1 or 2, you'll be set to go.