What is the closest thing to Windows notepad on the Mac?

TextEdit is included with OS X.

You can change it to Plain Text (Format > Make Plain Text) for non-RTF text editing, or make Plain Text the default (Preferences > Format).


If you want simple text editing, use TextEdit.

For code editing, one of the best choices is TextMate.


As already stated, TextEdit is the notepad of OS X (although a more powerful notepad that is). For more advanced stuff, TextMate (already recommended) is very nice. A nice free and famous alternative is Bare Bones's TextWrangler.

You can do pretty much with either.