this is the post title line from the default theme’s index.php:
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
you could add the code like this:
<h2><?php if( (time() - get_the_time('U')) < (24*60*60) ) { echo 'new '; }; ?><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
the ‘new’ would appear in the same line as the title, but not linked.
Can I also use it for displaying the word “new” next to category?
as long as it is in the loop, you could put that code anywhere; just be aware the the term ‘new’ refers to the creation date of the post.