ASP.NET and JQuery play really nicely together (and also with ASP.NET AJAX library too), I have used all of them together on a recent ASP.NET 3.5 web application. There are some oddities to be aware of, but on the whole work well together.
Firstly, you need to ensure that you have a script tag with src of your jQuery file-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
I have usually done this by adding a ScriptReference to the ScriptManager, but either way works. Then put your jQuery code after the script tag -
$(function() { alert("This is SPARTA!!!!!!!!!"); });
If your jQuery file is in a folder and you have some kind of authentication set up on your site, then you need to ensure that the folder is accessible on the pages where you are using jQuery, by modifying the web.config (much like you need to do with images and css). I've been tripped up by this before. You can check in firebug to see if the jQuery code is accessible (i.e. visible) by expanding the relevant script node; if you see some kind of HTTP error, then it could be due to the script not being accessible.
As others have already said, there could be conflicts with other JavaScript libraries. You can still use the $ shorthand if also using libraries by using the following pattern
(function($) {
$(function() { alert("This is SPARTA!!!!!!!!!"); });
})(jQuery);
This means that $ within the scope of the outer function is shorthand for jQuery object.